Skip to main content
Glama

Buy onward ticket

buy_ticket
Idempotent

Buy the ticket for a flight from search_flights, paid in USDC. Call it first without payment to get the price, wallet address and MPP challenges. After sending the USDC, call it again with tx_hash and chain (or an MPP credential in _meta "org.paymentauth/credential"). x402 clients can instead sign one of the offers in error.data.x402 and retry with the PaymentPayload in _meta "x402/payment", with no gas needed. Returns the ticket link and PDF.

Input Schema

NameRequiredDescriptionDefault
chainNoChain the USDC was sent on, defaults to base
emailNoOptional, also emails the ticket here
tx_hashNoHash of the USDC transfer that paid for it
last_nameYesPassenger's last name, as on their passport
ticket_idYesThe flight id from search_flights
first_nameYesPassenger's first name, as on their passport

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.8/5.0
Behavior5/5

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

Annotations cover only the generic safety profile (readOnly=false, idempotent=true, destructive=false, openWorld=true), but the description adds the non-obvious two-phase call protocol, the two accepted payment mechanisms, the fact that no gas is needed for x402, the location of payment offers in error.data.x402, and the return contents. None of this is derivable from the structured fields and nothing contradicts the annotations.

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 call sequence is front-loaded in the first sentence and each subsequent sentence carries distinct information about a different payment path. It is dense and slightly run-on when listing the x402 fallback, but no sentence is filler given the complexity of the protocol being described.

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 paid, open-world purchase tool with no output schema, the description supplies the prerequisites, both payment flows, the retry inputs, and the return shape ('the ticket link and PDF'). An agent has everything needed to drive the two-call interaction without guessing.

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?

Schema coverage is 100%, so the six parameters are already documented and the baseline would be 3. The description earns above baseline by explaining the role of tx_hash (proof of the USDC transfer) and chain (default base) within the payment flow, and by documenting the _meta 'org.paymentauth/credential' and 'x402/payment' payloads that are not represented in the schema at all.

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 and resource ('Buy the ticket for a flight from search_flights, paid in USDC') and ties the input directly to the sibling tool that produces it. An agent can distinguish this from search_flights and find_airports without opening any schema, since the payment and purchase semantics are unique to this tool.

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 ('Call it first without payment to get the price... After sending the USDC, call it again with tx_hash and chain') and names an alternative payment path for x402 clients with the exact retry mechanics. Both when-to-use and the alternate route are spelled out, 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