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 owner approval; 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'.

TDQS

A4.5/5.0
Behavior5/5

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

Annotations declare destructiveHint=true, so the mutation is known, but the description goes much further. It discloses the exact return states (approved, pending_review, denied with reason, failed), explains the duplicate-detection behavior (escalated to pending_review rather than auto-approved), and details idempotency guarantees for retries (no double card or fee). It also surfaces a specific failure mode (missing Privacy.com key) and its remedy. This is exceptional transparency beyond what annotations 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 a single dense paragraph but is well-structured: it opens with the core action, then covers return values, retry safety, duplicate handling, and idempotency guidance in logical order. Every sentence adds necessary information for correct invocation and error recovery. It is longer than minimal but not padded; the complexity of the tool justifies the length. A slight improvement would be breaking into bullets, but it remains highly readable.

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?

Given the tool's complexity (9 params, 5 required, no output schema), the description is thorough. It explains the return states and error handling, which substitutes for an output schema. It covers retry behavior and duplicate escalation. It does not explicitly detail prerequisites like authentication, but that is likely implicit in the platform context. For a mutation tool with this much nuance, the description is nearly complete, missing only minor operational details like timeout expectations.

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?

The input schema has 100% coverage with every parameter described, so the baseline is 3. The description adds behavioral context for idempotency_key and merchant_url (whitelist matching), but these are already covered in the schema descriptions with comparable detail. The description does not introduce new parameter semantics beyond the schema; it reinforces but doesn't extend them, so 3 is appropriate.

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 description opens with a precise verb and resource: 'Submit a purchase request.' This clearly states the action and what it acts on. The tool's function is unambiguous and distinct from siblings like check_status, get_spending_summary, and retrieve_card, which are all read-oriented; there is no confusion about which one to invoke for creating a purchase.

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 explicitly instructs when to use this tool versus alternatives: after submitting, 'poll check_status rather than retrying' directly names the sibling used for follow-up. It also provides retry guidance (reuse same idempotency_key) and clarifies when a fresh key is appropriate ('only for a genuinely new, separate purchase'). These are concrete, actionable usage guidelines that leave no ambiguity.

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.

TDQS

A4.7/5.0
Disambiguation5/5

Each tool has a distinct role in the purchase lifecycle: submitting, checking status, retrieving the card, and viewing spending limits. The descriptions carefully separate read-only status checks from the one-time card draw.

Naming Consistency5/5

All tool names follow a clear verb_noun pattern: check_status, get_spending_summary, request_purchase, retrieve_card. The style is consistent and each verb accurately signals the action.

Tool Count5/5

Four tools cover the full purchase request workflow without unnecessary extras. Each tool addresses a distinct and necessary step, and the count feels appropriately scoped for the server's purpose.

Completeness4/5

The core lifecycle of request, status check, card retrieval, and spending visibility is well covered. Minor gaps exist, such as no explicit way to cancel a pending request or list historical purchases, but agents can work around these.