Skip to main content
Glama

purchase_credits

Instantly buy credits using a pre-saved Stripe payment method. CAUTION: This will charge the user's card immediately. Use only when balance is critical.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "payment_method_id": "<payment_method_id>"
    },
    "name": "purchase_credits"
  }
}

Input Schema

NameRequiredDescriptionDefault
packNoThe credit pack name (check list_credit_packs for prices).
amountNoCustom dollar amount (min $5).
payment_method_idYesStripe PM ID (e.g., "pm_...").

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changed
    • changedInput schema / properties / amount / description
      Previous value: -"Amount to purchase in dollars (min $5)"New value: +"Custom dollar amount (min $5)."
    • changedInput schema / properties / pack / description
      Previous value: -"Credit pack to purchase"New value: +"The credit pack name (check list_credit_packs for prices)."
    • changedInput schema / properties / payment_method_id / description
      Previous value: -"Stripe payment method ID"New value: +"Stripe PM ID (e.g., \"pm_...\")."
  2. First observed

TDQS

A4/5.0
Behavior4/5

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

With no annotations at all, the description carries the full burden and does disclose the critical trait: 'This will charge the user's card immediately.' It does not address failure behavior, idempotency, or whether charges can be reversed, which are meaningful gaps for an irreverible payment mutation.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two short sentences, front-loaded with purpose followed by the caution. Every clause earns its place and nothing is redundant.

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 payment mutation with no annotations and no output schema, the definition covers purpose, the destructive effect, and a usage condition. Missing are return behavior and how pack and amount interact, which keeps it from being fully complete.

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 baseline is 3. The description adds the important context that payment_method_id must be pre-saved, but says nothing about the pack-versus-amount relationship (both are optional in the schema), which is the main ambiguity an agent faces.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description names a specific verb and resource ('Instantly buy credits') and the mechanism ('using a pre-saved Stripe payment method'), which separates it from read-only siblings like get_credit_balance. It stops short of naming a sibling alternative such as create_checkout_session for the no-saved-method case, so an agent must infer that distinction.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

'Use only when balance is critical' gives an explicit when-to-use condition, and 'pre-saved payment method' implies the prerequisite. No alternative tool is named for the case where no saved payment method exists, so the routing guidance is incomplete.

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