Agent Preflight
Budgeted agent preflight: allow|block|reuse|defer|advise. Never executes destination tools. Free MCP
¿Debería usar esto?
Calidad y seguridad
Hallazgos (2)
- HIGH
- MEDIUMen preflight_tool_call
Basado en el análisis automatizado de las definiciones de herramientas y el cumplimiento del protocolo.
Costo de contexto
Este es el número aproximado de tokens que se consumen cada vez que las herramientas del servidor se cargan en el contexto de un modelo. Los recuentos más altos reducen la atención disponible para otras tareas.
Instalar
Instalación con un clic
Agrega esto a tu archivo `claude_desktop_config.json`:
{
"mcpServers": {
"agent-preflight": {
"url": "https://api.agent-preflight.com/mcp"
}
}
}Puntos de conexión remotos
https://api.agent-preflight.com/mcpstreamable-httpQué puede hacer
Inventario de herramientas
Herramientas (2)
🟢check_request(request, schema, economics)
Validate an HTTP API request body against a supplied JSON Schema before sending it. This tool does not execute the request. Use it when an agent needs to determine whether a proposed JSON body satisfies its expected schema. Optional economics adds proceed/abort advice from expected waste versus a $0.001 check.
Esquema de entrada
{
"type": "object",
"properties": {
"request": {
"type": "object",
"properties": {
"method": {
"type": "string",
"description": "HTTP method of the proposed request"
},
"url": {
"type": "string",
"description": "Absolute http(s) URL. This tool never fetches the URL."
},
"headers": {
"description": "HTTP headers as string key/value pairs",
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {
"type": "string"
}
},
"query": {
"description": "Query parameters",
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {}
},
"body": {
"description": "JSON body checked against schema"
}
},
"required": [
"method",
"url"
]
},
"schema": {
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {},
"description": "JSON Schema applied to request.body"
},
"economics": {
"description": "Optional V0.2 cost context. Omit for V0.1 validation-only output.",
"type": "object",
"properties": {
"downstreamCostUsd": {
"type": "number",
"minimum": 0,
"description": "USD cost of the target API attempt or success"
},
"billsOnInvalidRequest": {
"type": "boolean",
"description": "True when the target API charges or consumes quota on 4xx"
},
"retryCostUsd": {
"type": "number",
"minimum": 0,
"description": "USD model/tool-turn cost of one failed attempt"
},
"priorInvalidProbability": {
"description": "Prior probability the payload is doomed. Default 0.25",
"type": "number",
"minimum": 0,
"maximum": 1
},
"preflightPriceUsd": {
"description": "Price of this check. Default 0.001",
"type": "number",
"minimum": 0
},
"budgetRemainingUsd": {
"description": "Remaining agent budget. Checks above this are not +EV",
"type": "number",
"minimum": 0
}
},
"required": [
"downstreamCostUsd",
"billsOnInvalidRequest",
"retryCostUsd"
]
}
},
"required": [
"request",
"schema"
],
"$schema": "https://json-schema.org/draft/2020-12/schema"
}Esquema de salida
{
"type": "object",
"properties": {
"valid": {
"type": "boolean"
},
"errors": {
"type": "array",
"items": {
"type": "object",
"properties": {
"path": {
"type": "string"
},
"code": {
"type": "string"
},
"message": {
"type": "string"
}
},
"required": [
"path",
"code",
"message"
],
"additionalProperties": false
}
},
"warnings": {
"type": "array",
"items": {
"type": "object",
"properties": {
"path": {
"type": "string"
},
"code": {
"type": "string"
},
"message": {
"type": "string"
}
},
"required": [
"path",
"code",
"message"
],
"additionalProperties": false
}
},
"requestHash": {
"type": "string"
},
"economics": {
"type": "object",
"properties": {
"decision": {
"type": "string",
"enum": [
"proceed",
"abort"
]
},
"reason": {
"type": "string",
"enum": [
"valid",
"invalid_doomed_request"
]
},
"preflightPriceUsd": {
"type": "number"
},
"wasteIfSentUsd": {
"type": "number"
},
"realizedNetUsd": {
"type": "number"
},
"worthCheckingAPriori": {
"type": "boolean"
},
"aPrioriExpectedWasteUsd": {
"type": "number"
},
"aPrioriExpectedNetUsd": {
"type": "number"
}
},
"required": [
"decision",
"reason",
"preflightPriceUsd",
"wasteIfSentUsd",
"realizedNetUsd",
"worthCheckingAPriori",
"aPrioriExpectedWasteUsd",
"aPrioriExpectedNetUsd"
],
"additionalProperties": false
}
},
"required": [
"valid",
"errors",
"warnings",
"requestHash"
],
"$schema": "https://json-schema.org/draft/2020-12/schema",
"additionalProperties": false
}🟢preflight_tool_call(runId, stepId, tool, budget, task, ...)
Free MCP decision for generic search:web_search or browse:fetch proposals only. Returns structuredContent and JSON text, never destination results. Caller supplies cost estimates, post-consultation budget and history, executes tools and retrieves resultReference itself. Reuse requires explicit permission, positive TTL and matching nonempty goal hashes; history must belong to the caller. estimated fees/savings are hypothetical, not receipts; confidence is not calibrated. Paid HTTP is a separate $0.001 per settled POST interface. Full contract: https://agent-preflight.com/docs
Esquema de entrada
{
"type": "object",
"properties": {
"runId": {
"type": "string"
},
"stepId": {
"type": "string"
},
"tool": {
"type": "object",
"properties": {
"provider": {
"type": "string"
},
"operation": {
"type": "string"
},
"request": {
"type": "object",
"propertyNames": {
"type": "string"
},
"additionalProperties": {}
},
"estimatedExternalCostUsd": {
"type": "number",
"minimum": 0
},
"estimatedModelCostUsd": {
"type": "number",
"minimum": 0
}
},
"required": [
"provider",
"operation",
"request",
"estimatedExternalCostUsd"
]
},
"budget": {
"type": "object",
"properties": {
"remainingUsd": {
"type": "number",
"minimum": 0
},
"reservedUsd": {
"type": "number",
"minimum": 0
},
"maxToolCallsRemaining": {
"type": "integer",
"minimum": 0,
"maximum": 9007199254740991
}
},
"required": [
"remainingUsd"
]
},
"task": {
"type": "object",
"properties": {
"goalHash": {
"type": "string"
}
},
"required": [
"goalHash"
]
},
"history": {
"type": "array",
"items": {
"type": "object",
"properties": {
"toolCallId": {
"type": "string"
},
"fingerprint": {
"type": "string"
},
"outcome": {
"type": "string",
"enum": [
"success",
"terminal_failure",
"transient_failure"
]
},
"resultReference": {
"type": "string"
},
"ageSeconds": {
"type": "number",
"minimum": 0
},
"goalHash": {
"type": "string"
}
},
"required": [
"toolCallId",
"fingerprint",
"outcome",
"ageSeconds"
]
}
},
"capabilities": {
"type": "object",
"properties": {
"canReusePriorResult": {
"type": "boolean"
},
"canReduceScope": {
"type": "boolean"
}
}
},
"freshnessTtlSeconds": {
"type": "number",
"minimum": 0
},
"retryCap": {
"type": "integer",
"minimum": 1,
"maximum": 9007199254740991
},
"preflightPriceUsd": {
"type": "number",
"minimum": 0
}
},
"required": [
"runId",
"stepId",
"tool",
"budget"
],
"$schema": "https://json-schema.org/draft/2020-12/schema"
}Esquema de salida
{
"type": "object",
"properties": {
"decision": {
"type": "string",
"enum": [
"allow",
"block",
"reuse",
"defer",
"advise"
]
},
"enforcement": {
"type": "string",
"enum": [
"execute",
"safe_to_skip",
"advisory"
]
},
"reasonCodes": {
"type": "array",
"items": {
"type": "string"
}
},
"issues": {
"type": "array",
"items": {
"type": "object",
"properties": {
"path": {
"type": "string"
},
"code": {
"type": "string"
},
"message": {
"type": "string"
}
},
"required": [
"path",
"code",
"message"
],
"additionalProperties": false
}
},
"requestFingerprint": {
"description": "SHA-256 of version-2 exact proposal; absent on invalid input",
"type": "string"
},
"matchedCallId": {
"type": "string"
},
"estimated": {
"type": "object",
"properties": {
"preflightCostUsd": {
"type": "number"
},
"priceChargedUsd": {
"type": "number",
"description": "Modeled fee, not a settlement receipt"
},
"avoidableExternalCostUsd": {
"type": "number"
},
"avoidableModelCostUsd": {
"type": "number"
},
"netSavingsUsd": {
"type": "number"
},
"billable": {
"type": "boolean",
"description": "Modeled actionable status; MCP is unpaid"
},
"confidence": {
"type": "number",
"description": "Rule constant, not a calibrated probability"
}
},
"required": [
"preflightCostUsd",
"priceChargedUsd",
"avoidableExternalCostUsd",
"avoidableModelCostUsd",
"netSavingsUsd",
"billable",
"confidence"
],
"additionalProperties": false
},
"recommendation": {
"type": "object",
"properties": {
"action": {
"type": "string"
},
"resultReference": {
"type": "string"
}
},
"required": [
"action"
],
"additionalProperties": false
}
},
"required": [
"decision",
"enforcement",
"reasonCodes",
"issues"
],
"$schema": "https://json-schema.org/draft/2020-12/schema",
"additionalProperties": false
}Comunidad
Evidencia