Skip to main content
Glama

Buy Tickets

buy_tickets
Destructive

Buy tickets from a get_ticket_listings listing (event_id, uvid, quantity) on XP. Two calls: confirm=false returns a preview with the all-in total; confirm=true, once the person approves, completes the order and returns its order_uuid. Four payment rails, chosen with rail: 'stripe_link' (the default) pays by card on a Stripe-hosted checkout page, where the preview returns payment_link and checkout_session_id and confirm=true takes that checkout_session_id; 'privy' pays USDC from the person's XP wallet, signed by the server; 'x402' takes a Solana USDC payment the caller signs, passed as payment_proof; 'mpp' pays by card with a Stripe Shared Payment Token over the Machine Payments Protocol, sent in params._meta['org.paymentauth/credential'] or as payment_credential. Requires sign-in and the write:tickets scope, plus read:account for the balance check on 'privy'.

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": {
      "event_id": "<event_id>",
      "uvid": "<uvid>",
      "quantity": "<quantity>"
    },
    "name": "buy_tickets"
  }
}

Input Schema

NameRequiredDescriptionDefault
railNoPayment rail. 'stripe_link' (default) to pay by card on a Stripe-hosted Checkout page: the preview returns payment_link and checkout_session_id; after the user pays, confirm with checkout_session_id. 'privy' for server-signed delegate USDC. 'x402' for agent-signed Solana x402 payment with payment_proof. 'mpp' to pay with a Stripe Shared Payment Token over the MPP binding.stripe_link
uvidYesTicket group UVID from get_ticket_listings.
confirmNoMust be true to execute. False returns a preview only.
event_idYesEvent identifier from search_events or get_event_details.
quantityYesNumber of tickets to purchase.
facilitatorNorail='x402' only. Id from facilitators_available in the preview envelope; omit to use the deploy default. Pattern: ^[a-z][a-z0-9_]*$.
payment_proofNoRequired only for rail='x402' when confirm=True. Base64-encoded x402 v2 PaymentPayload (SVM 'exact') containing a partially-signed Solana USDC TransferChecked transaction.
payment_credentialNorail='mpp' only. JSON MPP credential, as a fallback for clients that cannot send params._meta. Prefer _meta when available.
checkout_session_idNorail='stripe_link' only, with confirm=true. The checkout_session_id returned by the preview.

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.6/5.0
Behavior5/5

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

Annotations only flag destructiveHint=true and openWorldHint=false; the description adds the material behavior an agent actually needs – that confirm=true is irreversible spend, that a preview precedes it, that confirmation requires prior human approval, which parameters flow between the two calls, and that sign-in plus write:tickets (and read:account for 'privy') scopes are required. That is substantive disclosure well beyond 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?

Front-loaded with the core action and identity before the payment-rail taxonomy, and no sentence is filler. The rail catalogue is delivered as one long dense sentence that is harder to scan than it needs to be, but nothing is redundant.

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 nine-parameter, multi-rail purchase tool this covers the full decision surface: prerequisites, preview/execute sequencing, per-rail requirements, and the returned order_uuid. An output schema exists, so it correctly avoids describing the response payload in detail while still naming the key identifier an agent must carry forward.

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 already 100%, so the baseline is 3; the description still earns more by explaining the state machine tying parameters together – checkout_session_id comes from the preview, payment_proof is only for agent-signed x402 at confirm=true, and facilitator defaults to the deploy value. The rail enumeration is restated rather than extended, which caps it below a 5.

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?

Opens with a specific verb+resource and names the upstream source explicitly: "Buy tickets from a get_ticket_listings listing (event_id, uvid, quantity) on XP." It also distinguishes the two-call nature of the operation, so an agent knows immediately this is not a read of listings but a purchase flow over one.

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

Usage Guidelines4/5

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

Gives clear operating context: call with confirm=false for a preview, then confirm=true "once the person approves" – an explicit human-in-the-loop gate that an agent must honor. It also routes by rail (x402 needs payment_proof, stripe_link needs checkout_session_id from the preview). It stops short of naming a sibling alternative such as buy_listing_now, so the choice between purchase paths is left 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