Skip to main content
Glama

Buy city credit

buy_credit
DestructiveIdempotent

Purchase prepaid city fee credit through x402 only. amount_dollars is an exact whole-dollar string from "1" through "10000"; one dollar buys one credit with no rounding. request_id is a non-secret identifier you make up for this one purchase, never a number or an amount. Take the fresh suggested_request_id that credit_preflight returned instead of inventing a number. Retry the exact same request_id and amount after a timeout, and never pay again when a durable response or payment attempt already exists. Send the x402 proof only in the outer X-PAYMENT HTTP header, never in tool arguments. A missing proof returns the current 402 challenge. PayPal buy routes and the human window remain web-only. Play gift packs stay app-only; private claim keys never enter MCP. Lost? Call front_door.

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": {
      "request_id": "<request_id>",
      "amount_dollars": "<amount_dollars>"
    },
    "name": "buy_credit"
  }
}

Input Schema

NameRequiredDescriptionDefault
request_idYesnon-secret retry identifier you make up, never a number or your balance; reuse it only to inspect or safely retry this exact purchase
amount_dollarsYeswhole-dollar string from 1 to 10000; one dollar buys one city fee credit

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • changedInput schema / properties / request_id / description
      Previous value: -"non-secret retry identifier; reuse it to inspect or safely retry this exact purchase"New value: +"non-secret retry identifier you make up, never a number or your balance; reuse it only to inspect or safely retry this exact purchase"
    • changedInput schema / properties / request_id / pattern
      Previous value: -"^[A-Za-z0-9][A-Za-z0-9_.:-]*$"New value: +"^(?![0-9]+(?:\\.[0-9]+)?$)[A-Za-z0-9][A-Za-z0-9_.:-]*$"
  2. First observed

TDQS

A4.7/5.0
Behavior5/5

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

Annotations already flag this as destructive, idempotent, and open-world, but the description adds the operational consequences: a missing proof returns the current 402 challenge, retries are safe only with the identical request_id and amount, and private claim keys never enter MCP. These are real behavioral disclosures about payments, not restatements of the hints.

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 purpose, then payment mechanics, then retry safety, then routing — a sensible order with no filler sentences. It is dense and telegraphic rather than wasteful, though the trailing clauses about PayPal, gift packs, and claim keys sit at the edge of the tool's scope and add bulk an agent may skim.

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

Completeness4/5

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

For a destructive, open-world payment tool with no output schema, the description covers the failure path (402 challenge without proof), the idempotency contract, and the header transport rule, which is almost everything an agent needs to call it safely. What it does not describe is the shape of a successful/durable response, which would be the final missing piece.

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 baseline is 3; the description earns above baseline by adding meaning not in the schema — request_id must be a made-up, non-secret identifier that is never a number or an amount, and should come from credit_preflight's suggested value rather than being invented. It also reinforces the exact whole-dollar, no-rounding semantics of amount_dollars, though that part largely duplicates the schema.

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 ('Purchase prepaid city fee credit') plus the sole transport constraint ('through x402 only'), and explicitly separates itself from web-only PayPal routes and app-only gift packs. An agent can tell what this tool buys and what it does not without opening any schema.

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 when-to-use rules (x402 only, via the X-PAYMENT header), an explicit prerequisite (take the fresh suggested_request_id from credit_preflight rather than inventing one), and explicit retry boundaries (reuse request_id only for this exact purchase; never pay again when a durable response or payment attempt exists). It also names a fallback sibling, front_door, when the agent is lost.

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.