Skip to main content
Glama

Request a purchase

request_purchase
Destructive

Submit a purchase request. Returns approved, pending_review, denied (with reason), or failed (a recoverable error, safe to retry, though some failures such as a missing Privacy.com key need the account owner to fix a setting first). A request that looks like a duplicate of another recent purchase on the account (same merchant and amount) is NOT auto-approved — it is escalated to pending_review for the account owner to approve, so poll check_status rather than retrying. IMPORTANT for retries: pass a stable idempotency_key that identifies this one distinct purchase intent, and reuse the SAME key if you retry after a timeout or error. Retries with the same key never issue a second card or charge a second fee — they return the original request's result. Use a fresh key only for a genuinely new, separate purchase.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
amountYesPurchase amount in the specified currency
currencyNoISO 4217 currency code, defaults to USD
descriptionYesWhat is being purchased
merchant_urlYesMerchant domain (e.g. amazon.com, aws.amazon.com). Required. Used for whitelist/blacklist matching with subdomain support, so 'amazon.com' on the whitelist allows aws.amazon.com.
category_hintNoMerchant category slug (e.g. cloud_compute, software_saas)
justificationYesWhy this purchase is needed. Required for all requests
merchant_nameNoOptional human-readable merchant name (e.g. 'AWS', 'GitHub')
idempotency_keyNoStable key for this one purchase intent. Reuse the SAME key when retrying so retries don't double-charge or double-issue a card (the server dedups on it atomically). Generate a fresh key only for a genuinely new purchase. Independent of the key, the server also runs a best-effort near-duplicate check on (merchant, amount) across the whole account and escalates suspected duplicates to pending_review for the account owner to decide; passing a stable key is still strongly recommended because it is the only fully atomic protection against concurrent double-submits.
merchant_country_codeYesISO 3166-1 alpha-2 country code of the MERCHANT (the store being purchased from, not the user's country). Required. Examples: 'US', 'GB', 'DE', 'CA', 'AU'.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / idempotency_key / description
      Previous value: -"Stable key for this one purchase intent. Reuse the SAME key when retrying so retries don't double-charge or double-issue a card (the server dedups on it atomically). Generate a fresh key only for a genuinely new purchase. Independent of the key, the server also runs a best-effort near-duplicate check on (merchant, amount) across the whole account and escalates suspected duplicates to owner approval; passing a stable key is still strongly recommended because it is the only fully atomic protection against concurrent double-submits."New value: +"Stable key for this one purchase intent. Reuse the SAME key when retrying so retries don't double-charge or double-issue a card (the server dedups on it atomically). Generate a fresh key only for a genuinely new purchase. Independent of the key, the server also runs a best-effort near-duplicate check on (merchant, amount) across the whole account and escalates suspected duplicates to pending_review for the account owner to decide; passing a stable key is still strongly recommended because it is the only fully atomic protection against concurrent double-submits."
  2. First observed

TDQS

A4.8/5.0
Behavior5/5

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

Annotations only declare destructiveHint=true, so the description carries the rest and does so thoroughly: the four outcome states including which failures are recoverable vs. require account-owner action, the near-duplicate escalation behavior, and the atomic idempotency guarantee against double-charging. This is exactly the extra behavioral context the annotation can't 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 and return states, then retry semantics — a sensible order with no filler sentences. It is on the long side and the idempotency guidance partially restates the schema's own idempotency_key description, which costs a point.

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?

Nine parameters with no output schema, so the description must explain return values — and it does, enumerating approved/pending_review/denied/failed and the retry-safety contract. Nothing an agent needs to invoke this 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 description coverage is 100%, so the baseline is 3, but the description adds operative meaning about idempotency_key that goes beyond its schema text: reuse the same key across retries, fresh key only for a distinct purchase, and that the key is the only fully atomic protection against concurrent double-submits. No added detail on merchant_country_code or amount limits, keeping it below 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?

States a specific verb+resource ('Submit a purchase request') and immediately enumerates the possible outcomes. It also implicitly routes the agent by naming check_status as the polling target after a pending_review escalation, which separates it from the read-only siblings (check_status, get_spending_summary, retrieve_card).

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?

Explicitly says when to retry (same idempotency_key on timeout/error), when NOT to retry (duplicate escalation to pending_review — poll check_status instead), and when to use a fresh key (genuinely new purchase). Alternatives and exclusions are both covered.

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.