Skip to main content
Glama

Buy credits

buy_credits
Idempotent

For a signed-in personal AI agent: buy credits for the person (6 is The First Drop while they may still have it). Once the person approves the price, it returns payUrl: give it to the person to pay by card. Then read the purchase until paid.

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

Input Schema

NameRequiredDescriptionDefault
qtyYes
approvalNoThe approval of the operation this tool returned with approval_required: { operation_id, revision, approver: "user" }, all three required; only the person approves. Call once without it, show operation.summary to the person, then call again with structuredContent.approval as it came.
idempotencyKeyNoAny unique string per intended action. A retry with the same key answers with the first result and never acts twice.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.5/5.0
Behavior4/5

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

Annotations already declare this is a non-read-only, non-destructive, idempotent, closed-world operation, so the description just needs to add context. It does: the call produces a payUrl that must be given to the person to pay by card, and the purchase must be read repeatedly until paid. What it omits is what happens on failure, expiry of payUrl, or whether an unpaid purchase can be abandoned.

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

Conciseness3/5

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

Three short sentences with the audience and the payUrl hand-off front-loaded, which is good. The parenthetical about "The First Drop" is unexplained jargon that costs the reader without adding actionable meaning.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

There is no output schema, and the description does cover the key return value (payUrl) and the approval loop. For a money-spending mutation it under-delivers on cost/currency, failure modes, and payUrl lifetime, so an agent could complete the happy path but not handle exceptions.

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 67% and the approval parameter already carries a thorough description of the approval_required round-trip, so the baseline is around 3. The description adds flow meaning ("once the person approves the price") but never explains what one unit of qty represents, what pricing tiers exist, or what the maximum of 30 implies, leaving the most consequential parameter undefined.

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 gives a specific verb and resource ("buy credits for the person") plus the audience restriction ("signed-in personal AI agent"), which is enough to separate it from read-oriented siblings like get_prices and get_purchase. The parenthetical "6 is The First Drop while they may still have it" is opaque and slightly muddies the otherwise clear statement of purpose.

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?

It implies a workflow: call, get approval from the person, hand them payUrl, then poll the purchase until paid. That sequencing is useful, but no sibling is named as an alternative or prerequisite (e.g., checking price first, or which tool to read the purchase with), so the agent must infer the routing.

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