{"slug":"api-agent-preflight-com-v0-2-preflight-tool-call-4cbc6e","title":"Pre-execution decision for a metered search or browse tool call","host":"api.agent-preflight.com","method":"POST","resource":"https://api.agent-preflight.com/v0.2/preflight/tool-call","category":"code","description":"Pre-execution decision for a metered search or browse tool call. Evaluates the proposal; does not execute the external tool.","price_listed":0.001,"price_asked":0.002,"state":"overcharges","state_label":"Asked 2.0x its listed price for its own example","checks_7d":1,"answered_7d":1,"latency_ms_median":649,"reported_calls_30d":1,"reported_payers_30d":1,"networks":["eip155:8453"],"badge":"unverified","paid_checks_7d":0,"paid_ok_7d":0,"example_input":{"body":{"budget":{"maxToolCallsRemaining":4,"remainingUsd":0.08,"reservedUsd":0.02},"history":[],"runId":"settlement-check-01","stepId":"paid-call-01","task":{"goalHash":"settlement-verification"},"tool":{"estimatedExternalCostUsd":0.01,"estimatedModelCostUsd":0.002,"operation":"web_search","provider":"search","request":{"max_results":5,"query":"Acme Corp Series B funding"}}},"bodyType":"json","method":"POST","type":"http"},"output_schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","properties":{"input":{"additionalProperties":false,"properties":{"body":{"additionalProperties":false,"description":"Pre-execution tool-call decision input. This endpoint evaluates the proposed tool call and does not execute the external tool.","properties":{"budget":{"additionalProperties":false,"properties":{"maxToolCallsRemaining":{"minimum":0,"type":"integer"},"remainingUsd":{"minimum":0,"type":"number"},"reservedUsd":{"minimum":0,"type":"number"}},"required":["remainingUsd"],"type":"object"},"capabilities":{"additionalProperties":false,"properties":{"canReduceScope":{"type":"boolean"},"canReusePriorResult":{"type":"boolean"}},"type":"object"},"freshnessTtlSeconds":{"description":"Explicit positive TTL required for reuse. Omitted or zero disables reuse.","maximum":1000000000,"minimum":0,"type":"number"},"history":{"description":"At most 100 caller-owned prior outcomes; reuse requires explicit permission, positive freshness TTL and matching nonempty goal hashes.","items":{"additionalProperties":false,"properties":{"ageSeconds":{"minimum":0,"type":"number"},"fingerprint":{"type":"string"},"goalHash":{"type":"string"},"outcome":{"enum":["success","terminal_failure","transient_failure"],"type":"string"},"resultReference":{"type":"string"},"toolCallId":{"type":"string"}},"required":["toolCallId","fingerprint","outcome","ageSeconds"],"type":"object"},"maxItems":100,"type":"array"},"preflightPriceUsd":{"default":0.001,"description":"Modeled actionable fee only; cannot change the actual HTTP settlement price.","minimum":0,"type":"number"},"retryCap":{"default":1,"minimum":1,"type":"integer"},"runId":{"description":"Caller-scoped run identifier","minLength":1,"type":"string"},"stepId":{"description":"Caller-scoped step identifier within the run","minLength":1,"type":"string"},"task":{"additionalProperties":false,"properties":{"goalHash":{"description":"Opaque goal correlation token","type":"string"}},"required":["goalHash"],"type":"object"},"tool":{"additionalProperties":false,"properties":{"estimatedExternalCostUsd":{"description":"Estimated USD cost of the external tool call","minimum":0,"type":"number"},"estimatedModelCostUsd":{"description":"Optional estimated USD model cost for this step","minimum":0,"type":"number"},"operation":{"description":"Tool operation. Supported: search:web_search, browse:fetch","minLength":1,"type":"string"},"provider":{"description":"Tool provider. Supported: search, browse","minLength":1,"type":"string"},"request":{"additionalProperties":true,"description":"Provider-specific payload. search/web_search requires query (string 1..500) and optional max_results (1..10). browse/fetch requires url (http/https).","properties":{"max_results":{"maximum":10,"minimum":1,"type":"integer"},"query":{"maxLength":500,"minLength":1,"type":"string"},"url":{"minLength":1,"type":"string"}},"type":"object"}},"required":["provider","operation","request","estimatedExternalCostUsd"],"type":"object"}},"required":["runId","stepId","tool","budget"],"type":"object"},"bodyType":{"enum":["json","form-data","text"],"type":"string"},"method":{"enum":["POST"],"type":"string"},"type":{"const":"http","type":"string"}},"required":["type","method","bodyType","body"],"type":"object"},"output":{"properties":{"example":{"additionalProperties":false,"description":"Deterministic pre-execution decision. The destination tool is never executed by this service.","properties":{"decision":{"enum":["allow","block","reuse","defer","advise"],"type":"string"},"enforcement":{"enum":["execute","safe_to_skip","advisory"],"type":"string"},"estimated":{"additionalProperties":false,"properties":{"avoidableExternalCostUsd":{"type":"number"},"avoidableModelCostUsd":{"type":"number"},"billable":{"type":"boolean"},"confidence":{"description":"Rule constant, not a calibrated probability.","maximum":1,"minimum":0,"type":"number"},"netSavingsUsd":{"type":"number"},"preflightCostUsd":{"type":"number"},"priceChargedUsd":{"description":"Legacy modeled actionable fee, NOT an actual settlement receipt. Paid allow/advise responses can show zero here.","type":"number"}},"required":["preflightCostUsd","priceChargedUsd","avoidableExternalCostUsd","avoidableModelCostUsd","netSavingsUsd","billable","confidence"],"type":"object"},"issues":{"items":{"additionalProperties":false,"properties":{"code":{"type":"string"},"message":{"type":"string"},"path":{"type":"string"}},"required":["path","code","message"],"type":"object"},"type":"array"},"matchedCallId":{"type":"string"},"reasonCodes":{"items":{"type":"string"},"type":"array"},"recommendation":{"additionalProperties":false,"properties":{"action":{"type":"string"},"resultReference":{"type":"string"}},"type":"object"},"requestFingerprint":{"pattern":"^[a-f0-9]{64}$","type":"string"}},"required":["decision","enforcement","reasonCodes","requestFingerprint","issues","estimated"],"type":"object"},"type":{"type":"string"}},"required":["type"],"type":"object"}},"required":["input"],"type":"object"},"history":[{"day":"2026-10-04","reachable":true,"status":402,"valid_402":true,"asked_usdc":0.002,"price_match":false,"latency_ms":649,"error":null}],"description_full":"Pre-execution decision for a metered search or browse tool call. Evaluates the proposal; does not execute the external tool.","last_updated":"2026-10-04T00:54:37.968Z","schemes":["exact"]}