Skip to main content
Glama

Buy Credits

buy_credits
Destructive

Create a Stripe Checkout session for a credit pack ('starter', 'growth', or 'scale' — see get_pricing). Returns a checkout_url: open and pay it (card), and the webhook credits this account automatically within seconds. Requires Authorization: Bearer zs_....

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
packYes

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.6/5.0
Behavior4/5

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

Annotations already flag this as a non-read-only, open-world, non-idempotent, destructive operation, and the description adds real context beyond that: the Bearer zs_... auth requirement, the returned checkout_url as the completion step, and that crediting happens via webhook within seconds after payment. It does not warn that repeated calls create separate sessions, which matters given idempotentHint=false.

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?

Four short sentences, front-loaded with the action, then the return value, then the post-call flow, then the auth requirement. Nothing is redundant and each sentence adds information the agent needs to invoke and complete the flow.

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?

An output schema exists, yet the description still clarifies that the returned checkout_url must be opened and paid and that crediting is asynchronous via webhook. Auth requirements, valid values, and the end-to-end flow are all covered for a one-parameter purchase tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 0% and the single 'pack' parameter has no enum in the schema, so the description carries the burden entirely by enumerating 'starter', 'growth', and 'scale'. It also redirects to get_pricing for the meaning of each pack, which is exactly the missing information an agent needs.

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 and resource ('Create a Stripe Checkout session for a credit pack') and immediately grounds it with the concrete valid pack values. The reference to get_pricing makes it clear this is the purchase step rather than a pricing-lookup step, differentiating it from that sibling.

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?

Tells the agent to consult get_pricing for pack details and to open and pay the returned URL with a card, which is clear operational context. It does not explicitly state when not to call it (e.g., how to handle a duplicate purchase), so it falls short of full when/when-not guidance.

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