Skip to main content
Glama

agentpay — card-funded wallets for AI agents

Pay a service

pay_service

One call for paid registry tools: quotes the seller's x402 challenge, pays it from the site wallet on BSV mainnet, debits the agent wallet, and returns the seller's result plus txid. If the seller rejects the payment, the debit is refunded.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
keyNoAgent key (agp_…). Optional when the MCP connection sends Authorization: Bearer.
refNo
toolYesTool name on that service
paramsNoTool arguments (body for POST, query for GET)
serviceIdYesRegistry service id (from list_services)
approvalIdNoApproval id from a prior approval_required response
amountCentsNoOverride the USD cents charged (min 1 cent default)
descriptionNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.2/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does a good job: it discloses that the tool quotes, pays, debits the agent wallet, returns result plus txid, and refunds if the seller rejects. It stops short of detailing auth prerequisites or the approval flow, but the core side effects are transparent.

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 tight sentences with the primary purpose front-loaded and the refund behavior appended as a meaningful caveat. Every clause adds information without redundancy.

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 complex payment tool with no output schema and no annotations, the description covers the main flow, the refund behavior, and the return payload shape. It could mention approval_required handling or how it relates to service_quote, but the essentials an agent needs to invoke it are present.

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 75%, so most parameters are already documented. The description adds behavioral context (e.g., that the tool quotes the x402 challenge and refunds on rejection) but does not add new meaning for uncovered parameters like ref or description. This is acceptable but not exceptional.

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 uses a specific verb ('pays') with a clear resource ('paid registry tools') and details the full operation: quote the x402 challenge, pay from the site wallet, debit the agent wallet, and return seller result plus txid. This makes the tool's role distinct from siblings like service_quote or spend.

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?

It clearly scopes the tool to 'paid registry tools' and describes a one-call flow that combines quoting and paying, which tells an agent when this tool fits. It does not explicitly name alternatives or exclusions, but the context is strong enough to guide selection.

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