Skip to main content
Glama

How to pay with x402

get_payment_options
Read-onlyIdempotent

What to pay, and where, to buy an llms.ink account (API key plus $5.00 of credit) or to add credit to the account of the API key in use, in USDC on Base with x402. This tool does not pay: it returns the exact x402 payment requirements (accepts) for an HTTP POST that an x402 client (for example x402-fetch) pays and sends with an X-PAYMENT header. Credit is 1.00 to 500 US dollars per top-up.

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": {
      "purpose": "<purpose>"
    },
    "name": "get_payment_options"
  }
}

Input Schema

NameRequiredDescriptionDefault
centsNoFor "credits": how much to add, in US cents.
purposeYes"account": a new account with its own API key. "credits": more credit for the account of the API key in use.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.4/5.0
Behavior5/5

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

Beyond the read-only and idempotent annotations, the description explains the key behavioral constraint: this tool does not pay but returns payment requirements for a client to submit. It also adds the operational flow (HTTP POST, X-PAYMENT header) and the 1.00–500 USD top-up range.

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

Conciseness4/5

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

The description is front-loaded and every sentence adds relevant information: purpose, non-payment behavior, client flow, and credit range. It is somewhat dense with compound sentences, but there is no wasted content.

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?

With no output schema, the description still explains what is returned (`accepts` payment requirements) and how the result is used by an x402 client. It covers the important operational and scope details an agent needs before calling it.

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 100%, so the enum meanings and cents bounds are already documented. The description adds a human-readable dollar range for top-ups but does not explain the `cents` parameter or its default beyond what the schema provides.

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 states a specific resource: the exact x402 payment requirements (`accepts`) needed to buy an account or add credit. It also explicitly says the tool does not pay, which sharply distinguishes it from a payment-execution tool.

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 clear usage contexts for both purposes (`account` and `credits`) and states the prerequisite that an x402 client must perform the HTTP POST with an X-PAYMENT header. It does not explicitly name or compare against sibling alternatives such as get_credits.

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