Skip to main content
Glama

Buy city credit

buy_credit
Idempotent

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. Lost? Call front_door.

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.8/5.0
Behavior5/5

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

Adds substantial behavior beyond annotations: the x402 proof must arrive only in the outer X-PAYMENT HTTP header (never as an argument), a missing proof returns the current 402 challenge, PayPal routes and the human window are web-only, and idempotency semantics are spelled out via request_id reuse. This is exactly the context annotations cannot express.

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 parameter rules, then retry/payment mechanics, so the most important information lands first. It is dense and slightly repetitive with the schema (e.g. 'never a number or an amount'), which keeps it just short of a 5.

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 two-parameter mutation with no output schema, it covers everything an agent needs: payment header placement, the 402 challenge when proof is absent, retry/idempotency rules, the preflight dependency, and the web-only escape hatches.

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, but the description adds real meaning: one dollar buys one credit with no rounding, and request_id must come from credit_preflight rather than be invented. The only minor gap is that it largely restates the schema's 1–10000 string range.

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 exclusive channel ('through x402 only'), which separates it from siblings like credit_preflight, credit_gift, withdraw and payment_attempt. An agent knows immediately this is the paid credit-buying action.

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 routing: obtain suggested_request_id from credit_preflight, retry with the identical request_id/amount after a timeout, never re-pay when a durable response or payment attempt exists, and call front_door when lost. Names the prerequisite tool, the alternative suspects, and the conditions that select them.

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.