Skip to main content
Glama

clearance_x402_ap2

Paid transaction-clearance decision for an autonomous x402 purchase. Use after create_ap2_challenge and after receiving the merchant's real PAYMENT-REQUIRED challenge, but before paying the merchant. Verifies AP2 v0.2 authority, exact request/challenge integrity, and public merchant-risk evidence. Returns clearance_decision APPROVED, REVIEW or DENIED and a signed clearance_token. APPROVED may proceed automatically; REVIEW should not auto-pay; DENIED should not pay. Machine price: $0.001 via x402.

Input Schema

NameRequiredDescriptionDefault
nonceNo
payerYesBase payer wallet address that would pay the merchant.
requestYesExact HTTP request the agent intends to execute if clearance permits it.
categoryYesService/purchase category for the transaction.
merchant_idYesStable merchant identifier covered by the AP2 authority.
ap2_authorityYes
payment_requiredYesMerchant's real x402 PAYMENT-REQUIRED payload, decoded or encoded.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.4/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the burden and does well: it discloses the machine price ($0.001 via x402), the verification scope (AP2 v0.2 authority, request/challenge integrity, merchant-risk evidence), and that it returns a signed clearance_token. It omits idempotency, whether repeated calls are billed, and any rate limits or auth prerequisites.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded with the core purpose, then sequencing, then verification scope, then return semantics and pricing. Every sentence is load-bearing with no filler.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

No output schema exists, so the description correctly supplies the return contract (clearance_decision values and signed clearance_token). Given 7 params, nested ap2_authority, and no annotations, it is nearly complete, though it says nothing about the nonce parameter or failure/error behavior.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 71%, so most parameters are already documented in the schema. The description references the key concepts (PAYMENT-REQUIRED challenge, AP2 authority, exact request) but adds no syntax, format, or constraint detail beyond what the schema already provides, so the baseline of 3 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb+resource ('Paid transaction-clearance decision for an autonomous x402 purchase') and its scope is distinguishable from siblings like authorize_x402_ap2 and create_ap2_challenge.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives explicit sequencing: use after create_ap2_challenge and after the merchant's PAYMENT-REQUIRED challenge, but before paying. It also prescribes behavior per outcome (APPROVED may proceed automatically, REVIEW should not auto-pay, DENIED should not pay), leaving nothing to inference.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources