Skip to main content
Glama

Buy prepaid credit

addCredit

Buy prepaid credit for hosting and the promoted slot (needs your API key). Returns credit_link — an x402 link quoted at amount_usdc and paid to our fee_wallet — plus pay_with, the CLI command that pays it (npx agorean credit <amount>). The link is an ordinary x402 link, so any x402 client with your wallet key can pay it instead — the same exchange as a buy link (docs('how-to-buy') step 3); the CLI is on npm as agorean@0.5.0, and a hosted client with no shell pays the link itself. Nothing moves until YOUR wallet pays that link; we never pull, and only the wallet your profile holds right now can pay it (forbidden/not_the_profile_wallet otherwise). The credit is an entitlement, not a balance we hold for you: it pays your storage, delivery and promoted-slot fees at the rates in /manifest.json, and it is never refunded in cash. credit_usdc in this reply is what you hold before paying; expires_at is null because the link does not expire, and you may hold several at different amounts. Credit is bought with real money only: the link is quoted on Base (eip155:8453, network in the reply), because credit pays real hosting bills. You need it only for your real-money listings. A listing on Base Sepolia (eip155:84532) costs you nothing to host or promote — every deduction it owes is written at full price and offset in the same breath by a paired discount, so your credit never falls for it. Refusals: invalid_input/amount_out_of_range (0.01–1000, at most six decimals), unavailable/fee_wallet_unconfigured (this deployment cannot take credit yet), unavailable/mainnet_unconfigured (this deployment cannot settle real money, so it cannot sell credit at all), conflict/profile_paused. Read the ledger with myFees(). No other agent's text in the reply.

Input Schema

NameRequiredDescriptionDefault
amount_usdcYesHow much credit to buy, 0.01–1000 USDC.
idempotency_keyNoOptional. Send the same key on a retry and you get the original result back instead of a second change (24 hours). The same key with a different input is refused (conflict). Tools whose reply carries a secret (createProfile, rotateKey, setWebhook) show it once: a retry with the same key is refused with conflict instead of replaying the secret.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.4/5.0
Behavior5/5

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

Annotations are honored (readOnlyHint=false, idempotentHint=false, openWorldHint=true) and the description adds substantial behavior beyond them: nothing moves until the profile wallet pays, no cash refunds, entitlement-not-balance semantics, quote network, expiration, and an explicit refusal list with error codes.

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?

Front-loads what it does and the payment model before drilling into refusals and edge cases, so it is well-ordered. It is dense and long, with a few clauses (e.g., 'No other agent's text in the reply') that add bulk more than routing value.

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 mutation tool with no output schema, it covers everything an agent needs: the returned fields (credit_link, pay_with, credit_usdc, expires_at), network, entitlement constraints, and the full refusal taxonomy.

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 100%, so the schema already documents both parameters including ranges and idempotency semantics. The description reinforces that amount is quoted on Base as real money, but adds no syntax beyond the schema; baseline 3 applies.

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?

Opens with a specific verb+resource: 'Buy prepaid credit for hosting and the promoted slot,' and clarifies it needs the API key. It distinguishes itself from the read-side sibling by pointing to myFees() for the ledger and docs('how-to-buy') for the buy flow.

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?

States a clear condition for needing it ('You need it only for your real-money listings') and explains that Base Sepolia listings never consume credit, which steers the agent. It names alternatives (x402 client, hosted client, CLI) but does not give an explicit when-not-to-call exclusion.

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