Skip to main content
Glama

KodShop catalog

buy_product

Buy a gift card, service top-up or travel eSIM and receive the delivery. Paid in USDC on Base (x402), no account and no browser. Call it twice: first with the order arguments to get payment requirements and an order_id (nothing is charged), then with that order_id plus the signed x402 payment payload to settle and receive the code.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
emailNoDelivery address. The code, eSIM profile or number is emailed here, and it is the only identity the order has. Required on the first call.
amountNoOnly for products where get_product reported requires_amount; send instead of item_id.
item_idNoDenomination id from get_product items[].
order_idNoSecond call only: the order_id returned by the first call.
quantityNoCopies to buy. Defaults to 1 — send it only to buy several.
product_idNoProduct id from search_catalog.
product_typeNogiftcard = voucher, topup = service recharge. eSIM data plans from search_catalog are bought as giftcard too — the value names the order shape, not the goods.
account_numberNoOnly for products where get_product reported requires_account: the recipient account the top-up credits.
payment_payloadNoSecond call only: the signed x402 PaymentPayload built from the requirements the first call returned.

TDQS

A4.7/5.0
Behavior5/5

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

With no annotations provided, the description carries the full behavioral disclosure burden and does it well. It reveals the payment rail (USDC on Base/x402), account-free/browser-free operation, the two-phase behavior, that the first call is non-charging, and that the second call settles and delivers the code.

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 dense sentences front-load the core purpose and then describe the required two-call sequence without wasted words. Every clause adds useful information: product scope, payment method, no-account/no-browser constraint, and charging behavior.

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?

Despite having no output schema and no annotations, the description covers the essential flow for a complex 9-parameter purchase tool: what to send on each call, what the first call returns, how payment works, and what the user receives. The schema fills in per-parameter conditional requirements, so the combined context is sufficient.

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 adds meaningful workflow semantics beyond the schema by explaining how order_id and payment_payload relate to the first and second calls, and clarifies that the first call returns payment requirements. This raises it above baseline.

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 names a specific action ('Buy'), the exact product categories ('gift card, service top-up or travel eSIM'), and the delivery outcome ('receive the code'). It is immediately distinguishable from sibling tools get_product and search_catalog, which are lookup/pre-purchase steps in the same workflow.

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?

The description gives explicit two-call usage instructions: first call with order arguments to obtain payment requirements and an order_id with no charge, second call with order_id and signed x402 payload to settle. It does not explicitly contrast buy_product with get_product/search_catalog, but the workflow is clear enough that an agent knows when this tool is the purchasing step.

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.

TDQS

A4.3/5.0
Disambiguation5/5

Each tool has a clearly distinct purpose: searching the catalog, fetching a specific product's details, and executing a purchase. There is no overlap or ambiguity between the three tools.

Naming Consistency5/5

All tool names follow a consistent verb_noun pattern: search_catalog, get_product, buy_product. The naming convention is uniform and predictable.

Tool Count5/5

Three tools is well-scoped for a catalog and purchase workflow: browse, inspect details, and buy. Each tool earns its place without unnecessary redundancy or gaps.

Completeness5/5

The surface covers the full user journey for a digital catalog store: discovering products, retrieving detailed product information, and completing a purchase. No critical operations appear to be missing for the stated purpose.

Resources