Skip to main content
Glama

Pay for an order in USDC

pay_order

Pay for an order in USDC over x402, without opening a browser.

Only for an MCP client that signs x402 payments itself: call it once for the payment requirements, then repeat the call carrying the signed payment in _meta['x402/payment'] and it settles and starts the eSIM. If your wallet is a separate tool, make an x402 request to the order's x402_url instead — this tool cannot take a payment on a wallet tool's behalf.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
order_idYesorder_id from create_checkout

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
errorNoHow to pay, for the 402 case
resultNo
statusNo
acceptsNox402 payment requirements to satisfy
order_idNo
next_stepNo
paid_withNo
transactionNoOn-chain transaction hash
x402VersionNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "additionalProperties": true,
      +  "description": "Without a payment: the x402 payment requirements (accepts, error). With one: the settled order (transaction, next_step), or the unchanged order plus `result` when it was no longer awaiting payment.",
      +  "properties": {
      +    "accepts": {
      +      "description": "x402 payment requirements to satisfy",
      +      "items": {
      +        "type": "object"
      +      },
      +      "type": "array"
      +    },
      +    "error": {
      +      "description": "How to pay, for the 402 case",
      +      "type": "string"
      +    },
      +    "next_step": {
      +      "type": "string"
      +    },
      +    "order_id": {
      +      "type": "string"
      +    },
      +    "paid_with": {
      +      "type": "string"
      +    },
      +    "result": {
      +      "type": "string"
      +    },
      +    "status": {
      +      "type": "string"
      +    },
      +    "transaction": {
      +      "description": "On-chain transaction hash",
      +      "type": "string"
      +    },
      +    "x402Version": {
      +      "type": "integer"
      +    }
      +  },
      +  "type": "object"
      +}
  2. First observed

TDQS

A4.7/5.0
Behavior4/5

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

Annotations already indicate readOnlyHint=false and destructiveHint=false, but the description adds important behavioral context: it requires a two-step process, uses _meta for the payment, and settles and starts the eSIM after payment. It also notes a critical limitation with wallet tools. No contradiction with annotations.

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?

The description is compact and well-structured, with three sentences covering purpose, usage, and a critical caveat. Each sentence adds necessary information without redundancy. Front-loaded with the core purpose.

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?

Given the tool's complexity (two-step payment process, meta usage), the description fully covers the workflow and constraints. It also clarifies the environment where it works, which is critical for the MCP client. The output schema exists, so return values don't need explanation. The description is complete for an agent to invoke correctly.

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

Parameters4/5

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

The only parameter, order_id, is already described in the schema as 'order_id from create_checkout', which is clear. The description doesn't add much beyond that, but since schema coverage is 100%, additional description isn't necessary. The description does reinforce that order_id comes from create_checkout, which is helpful.

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 clearly states the tool's purpose: 'Pay for an order in USDC over x402' and distinguishes it from siblings by noting it's for MCP clients that sign x402 payments themselves. It also differentiates from create_checkout and other order-related tools.

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?

Provides explicit usage guidelines: call once for payment requirements, then repeat with signed payment in _meta. Also tells when NOT to use it (if wallet is a separate tool, use x402_url instead), and mentions a key limitation: cannot take payment on behalf of a wallet tool.

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