Agent Preflight

Budgeted agent preflight: allow|block|reuse|defer|advise. Never executes destination tools. Free MCP

我該用這個嗎

品質與安全性

A
說明品質
100%
結構描述完整度
87%
命名品質
90%
汙染風險
80%
權限相符程度
100%
協定合規性
100%

發現項目(2)

  • HIGHTool poisoning patterns detected
  • MEDIUMTool description contains URL to non-standard domain在 preflight_tool_call 中

根據工具定義與協定合規性的自動化分析。

上下文成本

~1,698Token(工具定義)
~9.0 KB典型回應大小
中等的注意力影響(128k 上下文的 1.33%)

這是每次將伺服器的工具載入模型上下文時所消耗的約略 token 數量。數量越高,可用於其他工作的注意力就越少。

安裝

一鍵安裝

將以下內容加入你的 `claude_desktop_config.json` 檔案:

{
  "mcpServers": {
    "agent-preflight": {
      "url": "https://api.agent-preflight.com/mcp"
    }
  }
}

遠端端點

https://api.agent-preflight.com/mcpstreamable-http

它能做什麼

工具清單

工具(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.

輸入結構描述

{
  "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"
}

輸出結構描述

{
  "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

輸入結構描述

{
  "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"
}

輸出結構描述

{
  "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
}

社群

為此伺服器評分

證據

近期觀測

已驗證未記錄版本2 個工具
已驗證未記錄版本2 個工具