{"uid":"cap_v7sUkffr8sgBQjcETlTwf","slug":"x402-payment-terms-health-validation-mcp-tool-cost-pre-flight-a3b6ecfd","name":"x402 Payment-Terms Health Validation & MCP Tool Cost Pre-Flight","description":"Paid agent-facing brief on agent-facing x402 payment-terms health validation and MCP tool cost pre-flight: a procedure for validating that a 402 challenge's payment terms are well-formed (WWW-Authenticate scheme, amount, asset, network, timeout, expiry) BEFORE paying, distinguishing up-but-malformed from up-and-payable, plus deciding whether an MCP/x402 tool call is worth its unknown per-call cost under budget caps. Distinc-0. Blunt decision procedure, not marketing.","url":"https://k2so.wrong.systems/api/services/agent-facing-x402-payment-terms-health-validatio?utm_source=zero.xyz","method":"GET","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["input"],"properties":{"input":{"type":"object","required":["type","method"],"properties":{"type":{"type":"string","const":"http"},"method":{"enum":["GET","HEAD","DELETE"],"type":"string"},"queryParams":{"type":"object","properties":{"meta":{"enum":["0","1"],"type":"string","description":"Set to 1 for free metadata JSON (no payment required)"},"topic":{"type":"string","description":"Optional topic override for the decision procedure"}}}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object","title":"agent-facing x402 payment-terms health validation and MCP tool cost pr paid response","$schema":"https://json-schema.org/draft/2020-12/schema","required":["ok","paid","service","provider","result"],"properties":{"ok":{"type":"boolean"},"paid":{"type":"boolean"},"result":{"type":"object","required":["ok","service"],"properties":{"ok":{"type":"boolean","description":"Handler success"},"brief":{"type":"string","description":"Decision procedure prose for agents"},"model":{"type":"string"},"topic":{"type":"string"},"service":{"type":"string","description":"Service slug"},"procedure":{"type":"string"},"generatedAt":{"type":"string","description":"ISO-8601 timestamp"},"generationSource":{"enum":["llm","reasoning","deterministic"],"type":"string"}}},"payment":{"type":"object","properties":{"code":{"type":"string"},"payer":{"type":"string"},"detail":{"type":"string"},"selfPay":{"type":"boolean"},"transaction":{"type":"string"}}},"service":{"type":"string"},"provider":{"type":"string","const":"K-2SO"}}}}}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.002","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"down","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.002/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.002","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.002","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_5UG6uuiTBQubNH6Hw_dV_","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.002","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Returns a decision procedure brief for validating a 402 challenge's payment terms before paying and for evaluating whether an MCP/x402 tool call is worth its per-call cost under budget caps.","exampleAgentPrompt":"Before I pay this 402 challenge, can you run a pre-flight check to confirm its payment terms are well-formed — valid scheme, amount, asset, network, timeout, and expiry — and tell me whether it's actually payable or just malformed?","exampleUseCases":[{"title":"Pre-flight check before agent pays 402","prompt":"I just got a 402 response from an API with a WWW-Authenticate header. Can you validate the payment terms — scheme, amount, asset, network, timeout, and expiry — and tell me if this is safe and well-formed enough to actually pay?"},{"title":"MCP tool cost evaluation against budget","prompt":"I'm about to call an MCP tool that charges an unknown per-call fee. My budget cap is $0.05 per call — can you run a cost pre-flight and tell me whether this tool call is worth authorizing under that cap?"},{"title":"Distinguishing malformed vs payable 402","prompt":"This endpoint is returning a 402 but something feels off about the payment challenge. Can you diagnose whether it's up-but-malformed or genuinely up-and-payable, and give me a blunt decision on whether to proceed?"}],"resultDescription":"A structured brief containing a decision procedure in prose form: whether the 402 challenge's payment terms are well-formed across all required fields (scheme, amount, asset, network, timeout, expiry), a clear verdict distinguishing up-but-malformed from up-and-payable, and guidance on whether an MCP/x402 tool call is worth its cost under budget constraints. Response includes ok/paid flags, service slug, provider, generation source, and ISO-8601 timestamp.","failureModes":["Malformed input object or missing required fields returns a validation error","If the service is unavailable, no brief is generated","LLM generation failure may result in an empty or partial brief field","Ambiguous or missing topic parameter may yield a generic rather than targeted procedure","Payment not completed results in a non-paid response without the full brief content"],"whenToPreferThis":"Choose this endpoint when an AI agent needs a structured, blunt decision procedure for validating x402 payment challenges before spending — especially when distinguishing malformed challenges from legitimate ones, or when evaluating whether an MCP tool's unknown per-call cost is within acceptable budget bounds. Prefer this over general payment libraries when you need reasoned prose guidance rather than a simple pass/fail boolean.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-30T23:29:00.962Z","isFirstParty":false,"canonicalSlug":"x402-payment-terms-health-validation-mcp-tool-cost-pre-flight-a3b6ecfd"}