Skip to main content
Glama

buy

Demo only: payments are switched off, so this answers with an error and nothing can be bought. Get the x402 payment challenge for a quote. This hosted server holds no wallet, so it does NOT spend your money: it returns the exact amount, asset, payTo address and facilitator for you to pay from your own Algorand wallet, then you POST the quote again with your payment signature. Requires prior human confirmation of the quote. Works the same for a quote from quote_vouchers; the paid response is the batch (batchId and claim links) rather than an order.

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": {
      "quoteId": "<quoteId>"
    },
    "name": "buy"
  }
}

Input Schema

NameRequiredDescriptionDefault
quoteIdYesthe quoteId returned by quote or quote_vouchers, after the human confirmed it

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / quoteId / description
      Added value: +"the quoteId returned by quote or quote_vouchers, after the human confirmed it"
  2. First observed

TDQS

A4.1/5.0
Behavior5/5

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

Goes well beyond the annotations: it discloses that the hosted server holds no wallet and does not spend funds, that the demo build returns an error, exactly which fields come back (amount, asset, payTo, facilitator), and that the voucher path yields a batch instead of an order. That is precisely the kind of safety and side-effect context an agent needs for a payment step.

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?

Sentences are information-dense with little filler, and the crucial constraint (no wallet held, no money spent) is front-loaded. The opening demo-mode sentence sits awkwardly against the detailed payment-flow description that follows, which costs some clarity.

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?

With only one parameter, no output schema, and annotations limited to readOnly/idempotent/destructive flags, the description carries the load well: return fields, prerequisites, the follow-up POST step, and the differing voucher outcome are all covered. An agent has everything needed to call it and interpret the result.

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 coverage is 100% and the schema already defines quoteId as the value returned by quote or quote_vouchers after human confirmation. The description adds only that the same identifier works for a quote_vouchers quote, which is marginal beyond the schema baseline.

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?

The description names a specific verb and resource: it gets the x402 payment challenge for a quote and returns the amount, asset, payTo address and facilitator. It also distinguishes outcomes from the sibling quote_vouchers path (paid response is a batch with batchId and claim links, not an order). The opening demo-mode caveat ('answers with an error and nothing can be bought') partially muddies what the tool actually does, keeping it from a 5.

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?

It states a prerequisite ('Requires prior human confirmation of the quote') and describes the two-step flow: fetch the challenge, pay from your own wallet, then POST the quote again with your payment signature. It also covers the alternative quote source (quote_vouchers). There is no explicit statement of when NOT to use it, but the sequencing guidance is clear.

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