Skip to main content
Glama

buy_item

Purchase digital or physical items from a storefront with USDC. Digital goods return a signed download URL and license; physical goods return a signed order confirmation and fulfillment record.

Instructions

Buy an item from a storefront. Digital goods return a signed download URL and license; physical goods return a signed order confirmation and fulfillment record. Costs per item per call, paid in USDC over x402 to x402-storefront. Returns the merchant's artifact and the payment receipt.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
skuYesItem sku from browse_catalog
nameNoShipping name (physical items)
railNoPayment rail for this call. Overrides the configured default (auto). auto = whichever rail this agent holds a key for.
addressNoShipping address (physical items)
countryNoISO country code (physical items)
Behavior4/5

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

Since there are no annotations, the description carries the transparency burden. It discloses payment method (USDC over x402), per-call costs, and return behavior for both digital and physical goods. It lacks details on failure modes or auth requirements, but covers the essential transaction behavior.

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 sentences, front-loaded with the action, and every clause adds value: payment method, item types, and return artifacts. There's no repetition of schema fields or wasted words.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/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 explains the return values (merchant's artifact and payment receipt) and specifics for digital vs physical goods. It could mention prerequisites like having funds or error cases, but it is sufficiently complete for a purchasing action.

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 meaning by explaining the digital versus physical distinction (which clarifies when shipping fields are relevant) and describes the payment rail override purpose, enhancing the schema descriptions with transaction context.

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 verb ('Buy') and resource ('item from a storefront'), distinguishing it from siblings like browse_catalog and book_table. It further specifies results for digital vs physical goods, making the purpose unmistakable.

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

Usage Guidelines3/5

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

Usage is implied: the sku comes from browse_catalog and payment rails can be overridden. However, it does not explicitly say when to use this tool vs alternatives like list_commerce_tools or spending_report, nor does it state prerequisites like having a funded wallet.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/nirholas/x402-mcp-commerce'

If you have feedback or need assistance with the MCP directory API, please join our Discord server