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. Full catalog: /api/tools. Lost? Read the city front door with the front_door tool, or at https://1f3d9.com/ if your client can open URLs.

Input Schema

TableJSON 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?

Annotations supply idempotentHint and destructiveHint, but the description goes further by explaining actual side-effect behavior: never pay again when a durable response or payment attempt exists, send proof only in the X-PAYMENT header, and expect a 402 challenge when proof is missing. This is precisely the kind of operational context that annotations alone do not provide.

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 description is front-loaded with the core purpose and densely packed with critical operational details. However, the closing navigation sentences ('Full catalog: /api/tools' and 'Lost? Read the city front door...') are general orientation boilerplate rather than tool-specific content, making the description slightly longer than necessary.

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 payment tool with no output schema, the description covers all invocation-critical aspects: exact parameters, payment protocol, proof placement, retry/idempotency behavior, error behavior for missing proof, and exclusions. Nothing an agent needs to call the tool correctly is missing.

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% and both parameters are already well documented, so the baseline is 3. The description adds real value beyond the schema by instructing the agent to use credit_preflight's suggested_request_id, by spelling out the exact retry semantics, and by clarifying the one-dollar-one-credit conversion with no rounding, though some of this repeats the schema's own descriptions.

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?

The opening sentence, 'Purchase prepaid city fee credit through x402 only', names a specific verb, resource, and payment method. It also distinguishes this tool from sibling credit_preflight and web-only PayPal buy routes by explicitly narrowing the purchase channel.

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?

The description gives explicit when-to-use guidance: purchase through x402, take the suggested_request_id from credit_preflight instead of inventing one, and retry with the exact same request_id and amount after a timeout. It also states exclusions ('PayPal buy routes and the human window remain web-only'), which routes agents away from alternatives.

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.