Skip to main content
Glama

Agent Tollbooth 402

Verify x402 V2 Payment Header

tollbooth_verify_x402
Read-onlyIdempotent

Verify an x402 V2 paymentPayload signature and expiry against paymentRequirements and replay records. Does not execute on-chain transfers.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "x402Version": "<x402Version>",
      "paymentPayload": "<paymentPayload>",
      "paymentRequirements": "<paymentRequirements>"
    },
    "name": "tollbooth_verify_x402"
  }
}

Input Schema

NameRequiredDescriptionDefault
x402VersionYesx402 protocol version integer (must equal 2).
paymentPayloadYesDecoded x402 V2 PAYMENT-SIGNATURE JSON payload object.
paymentRequirementsYesAccepted payment requirements object specifying amount, network, and payTo address.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.7/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint, destructiveHint=false and openWorldHint=false, so the safety profile is covered. The description adds real value beyond that: it discloses the specific checks performed (signature, expiry, replay records) and explicitly rules out on-chain transfer execution, which is the main behavioral ambiguity for a payment tool. It stops short of describing failure signaling.

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?

Two sentences, both earning their place: the first states the operation and its inputs, the second front-loads the critical scope exclusion. No filler or restatement of the title.

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

Completeness3/5

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

With nested object parameters and no output schema, the description leaves the return contract undefined: an agent cannot tell whether success yields a boolean, a verification object, or an error, nor what a replay/expiry failure looks like. Given the tool's role as a gate before settlement, that gap matters more than it would for a simple read.

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 description coverage is 100%, so all three parameters are documented in the schema, including the version==2 constraint and the meaning of paymentRequirements. The description reinforces that signature and expiry are read from paymentPayload, but adds no format, encoding, or validation-behavior detail beyond the schema.

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

Purpose4/5

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

Names a specific verb and resource ('Verify an x402 V2 paymentPayload signature and expiry against paymentRequirements and replay records') and bounds scope with 'Does not execute on-chain transfers.' It is clearly distinct from receipt issuance or checkout creation, though it does not name a sibling to route away from.

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

Usage Guidelines3/5

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

Use is implied by 'verify ... against paymentRequirements and replay records' — an agent can infer this is the pre-check step before acting on a payment. However, there is no explicit statement of when to call this versus tollbooth_pricing_quote or tollbooth_create_topup_checkout, and no prerequisites (e.g., that paymentRequirements must come from a prior quote).

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.