Skip to main content
Glama

buy_credits_x402

MOVES MONEY: buy a project's credits by paying in stablecoin over x402. Call once without x402_payment to receive the payment requirements (returned as an error result containing the x402 PaymentRequired object), sign them with your wallet, then call again passing the base64 payment payload as x402_payment. Requires no API key — the payment is the credential — and costs no CRD.

Input Schema

NameRequiredDescriptionDefault
creditsYesHow many credits to buy (within the project's min/max)
buyer_idNoIdentifier to credit (defaults to your paying wallet address)
buyer_nameNoDisplay name for the buyer record
project_idYesProject selling the credits
buyer_emailNoEmail to attach to the buyer record
x402_paymentNoBase64-encoded x402 PaymentPayload signed by your wallet
credit_type_idNoCredit type to buy (defaults to the project's x402 credit type)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.5/5.0
Behavior4/5

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

With no annotations supplied, the description carries the full burden and does well: it discloses that the first call deliberately returns the PaymentRequired object inside an error result (a genuinely surprising behavior), that no API key is required because the payment is the credential, and that no CRD is spent. It does not state what happens if payment succeeds but crediting fails, or whether a repeated payment payload is idempotent, which matters for a money-moving call.

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?

Three sentences, front-loaded with the risk warning, then the call sequence, then the auth/cost facts. Every clause carries information an agent needs to avoid a failed or duplicated payment; there is no filler.

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 7-parameter, no-annotation, no-output-schema money-movement tool, the description covers the essentials: the two-phase handshake, the unusual error-shaped first response, credential model, and cost. Remaining gaps (success payload shape, failure semantics) are modest relative to the high schema coverage.

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

Parameters4/5

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

Schema coverage is 100%, so the baseline is 3; the description earns above that by explaining the semantics of x402_payment as a base64 payload produced after signing the requirements from the first call, which is more than the schema's one-line description conveys. It adds nothing about buyer_id/buyer_name/buyer_email, but those are already self-documenting in the schema.

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 opens with a specific verb and resource ("buy a project's credits") and immediately qualifies the mechanism ("paying in stablecoin over x402"), which cleanly separates it from siblings like issue_credits, deduct_credits, and redeem_credits that move credits without a stablecoin payment. The "MOVES MONEY" prefix makes the operation class unmistakable at a glance.

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 gives an explicit two-step usage protocol: call once without x402_payment to obtain requirements, sign, then call again with the base64 payload. That is unusually actionable. It stops short of naming alternatives (e.g., when to use issue_credits or redeem_credits instead), so it is not a full when/when-not routing statement.

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