Skip to main content
Glama

purchase_package

Top up the ACCOUNT's credit balance by buying a package with USDC on Base — so you can keep publishing/boosting autonomously instead of stopping to ask the human to open teppek.com/pricing. The agent spends the account's package credits (1 credit = 1 USD) exactly like the human owner; this buys the SAME packages a human buys, just paid on-chain. Use it when create_listing/gold/flare returns 402 (out of credits) or 409 (listing limit). TWO STEPS: (1) call with pack_key only (pro/pro_plus/business) → you get a 402 PAYMENT_REQUIRED carrying { payment: { pay_to, amount_usdc, network: 'base', asset } }; (2) send exactly that much USDC to pay_to from the account owner's wallet, then call again with the SAME pack_key and payment_tx set to the transaction hash → the account is credited and you can retry the original action. NOT a per-listing payment. If it returns 404 AGENT_TOPUP_UNAVAILABLE, autonomous top-up is off — tell the owner to buy a package at the pay_url. A 202 PENDING_CONFIRMATION means the tx is not yet confirmed on-chain — retry shortly with the same payment_tx.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pack_keyYesWhich credit package to buy for the ACCOUNT: pro = 90 credits ($90 USDC), pro_plus = 180 ($180), business = 890 ($890). 1 credit = 1 USD.
payment_txNoOn-chain USDC (Base) transaction hash of your payment. OMIT on the first call to receive the payment instructions (pay_to + amount); then send the USDC and call again WITH payment_tx set to the tx hash to credit the account.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A5/5.0
Behavior5/5

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

The description thoroughly explains the tool's behavior: the two-step payment flow, the meaning of response codes (202 PENDING_CONFIRMATION, 404 AGENT_TOPUP_UNAVAILABLE), and the account crediting mechanism. It also notes that the agent spends the account's credits, which is crucial context. No contradiction with annotations (readOnlyHint false, destructiveHint false).

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?

Although long, the description is tightly structured and information-dense. It flows logically: purpose, when to use, steps, error handling, and retry guidance. Every sentence carries necessary content, and the structure makes it easy to follow despite its length.

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?

Given the tool's complexity (two-step payment, external blockchain interaction, potential error states), the description covers all necessary aspects: triggering conditions, procedure, response codes, retry behavior, and fallback instructions. It is complete for an agent to use correctly without additional context.

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

Parameters5/5

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

Schema coverage is 100% with both parameters (pack_key and payment_tx) described in detail. The description adds meaning by explaining the enum values (pro, pro_plus, business) with credit amounts and costs, and by clarifying the role of payment_tx (omit on first call, include on second). This goes beyond the schema's own descriptions.

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 clearly states the tool's purpose: 'Top up the ACCOUNT's credit balance by buying a package with USDC on Base.' It specifies the verb (top up), resource (credit balance), and method (buying a package), and distinguishes it from sibling tools by focusing on credit purchase and when to use it (402/409 errors).

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly states when to use: 'Use it when create_listing/gold/flare returns 402 (out of credits) or 409 (listing limit).' It provides a clear two-step procedure, including what to omit on the first call and what to include on the second, plus guidance on retry for pending confirmations.

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