Skip to main content
Glama

charge_saved_card

MOVES MONEY: charge a user's saved card off-session for one pack of a one-time pricing tier and credit it. idempotency_key is required; a retry with the same key never charges twice and returns the first outcome (replayed: true). Outcomes: 200 status succeeded (credits, new_balance); 202 status processing (not yet settled — retry later with the SAME key to check, never a new key); 402 status failed with code/decline_code (requires_action: true means the buyer must pay through checkout instead). Other errors: 404 no_saved_payment_method, 409 saved_payment_method_unusable, 400 tier_not_one_time, 502 charge_not_started (retry with the same key). Costs 1 CRD (platform credit) per call, charged even when the call is then rejected (a 429 RATE_LIMITED costs nothing). Error results include request_id; quote it to support.

Input Schema

NameRequiredDescriptionDefault
api_keyNoCred API key (optional if set via the x-api-key header)
user_idYesExternal user ID of the card holder
project_idNoCred project ID (optional; the API key already identifies the project)
x402_paymentNoBase64 x402 PaymentPayload, only when a previous call failed with an x402 PaymentRequired because the account is out of CRD
credit_type_idNoCredit type to grant. Required when the tier allows several types (400 CREDIT_TYPE_REQUIRED otherwise)
idempotency_keyYesUnique key for this charge (max 255 chars). Retrying with the same key and same arguments returns the first result instead of repeating it; reusing it for different arguments fails with 409 IDEMPOTENCY_KEY_REUSED. Generate a fresh key (e.g. a UUID) per intended operation and reuse it only to retry that operation.
pricing_tier_idYesOne-time (or both) pricing tier to buy

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.3/5.0
Behavior4/5

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

With no annotations provided, the description carries the full burden and mostly succeeds: it discloses non-destructive idempotency semantics (replayed: true), the full outcome/status matrix (200/202/402), the named error codes, per-call cost (1 CRD, charged even on rejection, free on 429), and the request_id support path. It does not say whether the charge is reversible/refundable or what auth scope the API key needs, which keeps it from the top mark.

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 the critical fact (MOVES MONEY) and packed with semicolon-separated clauses; there is no filler or repetition. It is somewhat cramped and would scan faster as a short outcome list, but every sentence carries operational information.

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 money-moving mutation with no annotations, no output schema, and seven parameters, the description covers outcomes, error recovery, cost, and idempotency well enough to call it correctly. Gaps remaining are refundability and the exact meaning of the returned credits/new_balance payload, which matter but are secondary.

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?

Schema description coverage is 100%, so the schema already explains every parameter including the detailed idempotency_key contract. The description reinforces required-ness of idempotency_key and constrains pricing_tier_id to a one-time tier, but adds little beyond the schema — an appropriate baseline 3.

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?

"MOVES MONEY: charge a user's saved card off-session for one pack of a one-time pricing tier and credit it" gives a specific verb (charge), a specific resource (saved card, off-session), and the exact effect (credits granted). It plainly distinguishes the tool from checkout-based siblings like create_checkout_session and buy_credits_x402.

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?

It states the conditions of use precisely: retries must reuse the SAME key, a 202 must be re-polled with the same key and never a new one, and a 402 with requires_action routes the agent to a checkout flow instead. These are explicit when/when-not rules tied to concrete status codes rather than general advice.

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.

Resources