Skip to main content
Glama

Buy credits

buy_credits

Wraps POST /api/house/credits. Buy a credit pack for resurrection. Returns a Stripe Checkout link for your human to pay; the credits arrive when the payment completes.

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": {
      "pack": "<pack>"
    },
    "name": "buy_credits"
  }
}

Input Schema

NameRequiredDescriptionDefault
packYesCredit pack: 100 ($1), 500 ($4, 20% off) or 1000 ($7, 30% off).

Output Schema

NameRequiredDescriptionDefault
packNoThe pack this checkout is for.
errorNoWhat went wrong, on a failure.
creditsNoCredits you have now, before the purchase completes.
detailsNoMore about a failure, when there is more to say.
messageNoA human and agent readable note about what just happened.
next_stepsNoGuided actions you can take from here. Present on nearly every response. /api/stats is a plain counter and carries none, by design.
suggestionNoWhat to try instead, on a failure.
checkout_urlNoStripe Checkout URL. Give it to a human: an agent cannot complete a card payment.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "$schema": "https://json-schema.org/draft/2020-12/schema",
      +  "additionalProperties": {},
      +  "description": "A checkout link for a credit pack.",
      +  "properties": {
      +    "checkout_url": {
      +      "description": "Stripe Checkout URL. Give it to a human: an agent cannot complete a card payment."
      +    },
      +    "credits": {
      +      "description": "Credits you have now, before the purchase completes."
      +    },
      +    "details": {
      +      "description": "More about a failure, when there is more to say."
      +    },
      +    "error": {
      +      "description": "What went wrong, on a failure."
      +    },
      +    "message": {
      +      "description": "A human and agent readable note about what just happened."
      +    },
      +    "next_steps": {
      +      "description": "Guided actions you can take from here. Present on nearly every response. /api/stats is a plain counter and carries none, by design.",
      +      "items": {
      +        "additionalProperties": {},
      +        "description": "A suggested next call. Following one is never required.",
      +        "properties": {
      +          "action": {
      +            "description": "Short name for the action, e.g. \"adopt\", \"feed\", \"view_schema\"."
      +          },
      +          "body": {
      +            "description": "A ready-to-send request body. Copy it and fill in what it shows."
      +          },
      +          "description": {
      +            "description": "What this step does and why you might take it, in the house voice."
      +          },
      +          "endpoint": {
      +            "description": "Path to call, e.g. \"/api/house/status\"."
      +          },
      +          "method": {
      +            "description": "HTTP method to use: GET, POST or DELETE."
      +          },
      +          "optional": {
      +            "description": "Extra fields you may add to body, each mapped to what to put in it. Never send this object as-is."
      +          },
      +          "url": {
      +            "description": "Absolute URL, when the step points off the API (a checkout page, a web page)."
      +          }
      +        },
      +        "type": "object"
      +      },
      +      "type": "array"
      +    },
      +    "pack": {
      +      "description": "The pack this checkout is for."
      +    },
      +    "suggestion": {
      +      "description": "What to try instead, on a failure."
      +    }
      +  },
      +  "type": "object"
      +}
  2. First observed

TDQS

A4/5.0
Behavior4/5

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

Beyond the annotations (openWorldHint, non-idempotent, non-destructive), the description discloses the crucial behavioral trait that this is an asynchronous, external-payment flow: the call returns a Stripe Checkout link and credits only arrive once payment completes. The 'for your human to pay' phrasing usefully signals a human-in-the-loop handoff. It does not say whether repeated calls spawn duplicate checkout sessions, which matters for a non-idempotent tool.

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?

Two sentences, front-loaded with the action and followed by the return behavior; little waste. The opening 'Wraps POST /api/house/credits' is internal plumbing that adds no decision value for an agent, keeping it from a 5.

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 single-parameter purchase tool with full schema coverage, an output schema, and annotations covering the safety profile, the description supplies the one thing structured fields cannot: that fulfillment is deferred until a human pays. Nothing needed to call it correctly is missing.

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 coverage is 100% and the enum already documents the three packs with prices and discounts, so the schema does the heavy lifting. The description adds only that the pack is for resurrection, which is context rather than parameter semantics; baseline 3 applies.

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 gives a specific verb and resource ('Buy a credit pack') plus the purpose ('for resurrection') and the concrete outcome ('Returns a Stripe Checkout link'). An agent can tell this apart from get_credit_balance (checking balance) or resurrect_creature (spending credits) without opening a schema.

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

Usage Guidelines3/5

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

Usage is only implied: needing credits for resurrection suggests calling this when short on credits, and 'for your human to pay' hints the agent cannot complete the flow alone. There is no explicit when-to-use/when-not framing, no mention of checking get_credit_balance first, and no guidance on whether to retry if a checkout link is abandoned.

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.