Skip to main content
Glama

Authorize an x402 payment before signing

guild_x402_payment_safety

PAID. Call this immediately BEFORE signing an x402 payment envelope.

Returns one short-lived, Guild-signed AGPD-1 allow/block credential bound to the exact target payment: scheme, CAIP-2 network, asset contract, atomic amount, payee and resource URL, plus optional capability and policy thresholds. Verify it offline with POST /wallet-binding/decision/verify.

This is the native MCP transport for the existing HTTP POST /wallet-binding/decision product. An unpaid call returns a complete x402 v2 challenge for the exact request digest. Retry with the official _meta['x402/payment'] carrier; adapters that cannot set request metadata may pass the identical signed PaymentPayload as x402_payment. Conflicting carriers fail closed before facilitator verification or settlement.

The decision is issued before metering, so malformed inputs or signing failures are never charged. api_key uses sandbox credits and is never external revenue. The free identity-only alternative is GET /wallet-binding/resolve.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
policyNo
api_keyNo
paymentYesThe exact target payment being authorized before wallet signing.
capabilityNo
ttl_secondsNo
x402_paymentNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

TDQS

A4.6/5.0
Behavior5/5

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

The description goes well beyond the annotations by disclosing the paid nature, that malformed inputs or signing failures are never charged, that api_key uses sandbox credits, that conflicting carriers fail closed, and that the credential can be verified offline via a specific endpoint. No contradiction with annotations is present.

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

Conciseness4/5

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

The description is front-loaded with the critical timing instruction and uses short paragraphs to cover cost, challenge behavior, carrier mechanics, and failure semantics. It is longer than the simplest possible description, but the additional length is warranted by the payment-safety context and each paragraph adds operational value.

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

Completeness5/5

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

For a complex payment-authorization tool with an output schema and nested inputs, the description covers purpose, timing, charge behavior, retry mechanics, verification, and alternatives. It provides enough context for an agent to invoke the tool correctly without needing to infer missing safety or billing 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?

With schema description coverage at only 17%, the description compensates for the payment object by enumerating its fields (scheme, CAIP-2 network, asset, amount, payee, resource URL) and explains `x402_payment` and `api_key`. However, `capability` and `ttl_seconds` are not explained beyond their defaults, and the exact semantics of 'capability and policy thresholds' remain vague.

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?

The description states 'Call this immediately BEFORE signing an x402 payment envelope' and explains it returns a short-lived, Guild-signed AGPD-1 allow/block credential bound to the exact target payment. This clearly identifies the tool's action and resource, and differentiates it from the HTTP endpoint and the free identity-only alternative.

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?

The tool explicitly states when to use it ('immediately BEFORE signing an x402 payment envelope'), names the HTTP alternative it replaces, explains how to retry with the `_meta['x402/payment']` carrier or the `x402_payment` parameter, and points to GET /wallet-binding/resolve as the free identity-only alternative. This is detailed, actionable usage guidance.

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.

TDQS

A4.7/5.0
Disambiguation5/5

Only one tool exists, so there is no possibility of confusing it with others. The tool's purpose is clearly defined as a pre-payment safety check.

Naming Consistency5/5

The single tool name uses a clear snake_case convention with a descriptive prefix. Without other tools, there is no inconsistent mixing.

Tool Count4/5

While a single tool is below the typical 3-15 range, the server is purpose-built as a native wrapper for a single HTTP endpoint, making the count appropriate for its narrow scope.

Completeness5/5

The tool covers the entire intended MCP surface for the payment safety workflow; verification is external to MCP, so there are no gaps within the tool set.