Skip to main content
Glama

buy_item

Purchases digital or physical storefront items by SKU, paying in USDC via x402 and returning the merchant artifact plus payment receipt.

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.

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": {
      "sku": "<sku>"
    },
    "name": "buy_item"
  }
}

Input 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)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • removedInput schema / additionalProperties
      Removed value: -false
  2. First observedv0.1.0

TDQS

A3.9/5.0
Behavior4/5

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

With no annotations supplied, the description carries the full burden and does substantial work: it discloses the payment model (costs per item per call, settled in USDC over x402 to x402-storefront) and what is returned alongside the artifact (payment receipt, license, fulfillment record). It omits whether purchases are final/non-refundable and what happens on payment or stock failure, which matters for an irreversible spend.

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?

Three dense sentences, front-loaded with the action, then outcomes, then cost and return shape. No filler; the only near-redundancy is restating the payment destination that also appears in the cost clause.

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?

For a five-parameter spend tool with no annotations and no output schema, the description is largely sufficient — it explains return values for both item classes and the payment side-effect. The remaining gap is failure/refund behavior and the discovery prerequisite, which an agent would need before committing funds.

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 all five parameters including the 'rail' enum are already documented. The description adds only the contextual split that name/address/country apply to physical goods, which is marginal value over the schema's own field 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?

States a specific verb ('Buy') and resource ('an item from a storefront') and goes further by distinguishing two outcome classes — digital goods (signed download URL + license) versus physical goods (signed order confirmation + fulfillment record). An agent can tell exactly what this tool accomplishes without opening the schema.

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 only implied: the presence of a required 'sku' taken from browse_catalog (documented in the schema, not the description) signals that discovery should precede purchase, but the description never says so explicitly, nor does it state prerequisites such as a funded USDC/x402 balance or when-not to use this tool.

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