Skip to main content
Glama

agentpay — card-funded wallets for AI agents

Spend from wallet

spend

Debit the wallet and mint a receipt. Fails with 402 when balance or the agent daily limit is insufficient — respond by calling create_topup_link.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
keyNoAgent key (agp_…). Optional when the MCP connection sends Authorization: Bearer.
refNoIdempotency-ish external reference
toolNoOptional tool label
serviceNoOptional service label
approvalIdNoApproval id from a prior approval_required response
amountCentsYesAmount in USD cents
descriptionYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.6/5.0
Behavior3/5

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

With no annotations, the description carries the behavioral disclosure burden. It discloses side effects (debit, receipt minting) and a failure mode (402 for insufficient balance or daily limit) with a recovery action. However, it omits the approval flow implied by approvalId, idempotency behavior, and the success response format.

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 sentences with no filler: the core effect, the failure condition, and the recovery path are all included efficiently. Information is front-loaded and each clause earns its place.

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

Completeness2/5

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

The tool is moderately complex with 7 parameters, no output schema, no annotations, and an approvalId that hints at a stateful approval flow. The description does not explain what a successful response contains, how approval_required should be handled, or how the ref idempotency field behaves, leaving meaningful gaps.

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 86%, so the schema already documents most parameters. The description adds context about balance/daily-limit failure but does not elaborate on the required description parameter or the meaning of approvalId beyond the schema.

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 states a specific action ('Debit the wallet') and its result ('mint a receipt'), clearly identifying what the tool does. It does not explicitly distinguish itself from sibling pay_service, so it stops short of a 5.

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?

The description gives concrete routing guidance: on a 402 failure, call create_topup_link. This is a clear when-to-use alternative, though it does not address when to choose spend over pay_service or service_quote.

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