Skip to main content
Glama

How to buy a piece (x402)

how_to_buy
Read-only

Return the x402 URL and payment requirements for one piece ($0.03 USDC on Base mainnet), plus step-by-step buying instructions. This tool does not take payment: pay with your own x402 client by calling GET on the returned URL. Free.

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": {
      "id": "<id>"
    },
    "name": "how_to_buy"
  }
}

Input Schema

NameRequiredDescriptionDefault
idYesCatalogue id, entry number or title.
formatNohtml (default, the interactive piece) or bundle (JSON with every format and an access token), or one export.html

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true and openWorldHint=false; the description adds genuinely useful context beyond them by clarifying that the tool does not transact and that payment happens out-of-band via an external x402 client. It also discloses cost and the returned artifacts (URL, payment requirements, step-by-step instructions). It does not mention URL expiry, rate limits, or retry behavior, so it falls short of a 5.

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?

Three short sentences, front-loaded with what is returned, followed by the critical 'does not take payment' constraint and the price. Every sentence carries information; nothing is redundant with the title.

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 read-only, two-parameter helper with a fully documented schema and no output schema, the description covers the purpose, the return contents, the price, and the exact follow-up action. An agent has everything needed to call it and act on the result.

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 both parameters (id and format, including the enum and default) are already fully documented in the schema. The description adds no parameter-level meaning beyond noting the price and that one piece is addressed. Baseline 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource: returns the x402 URL plus payment requirements and buying instructions for one piece, with a concrete price ($0.03 USDC on Base mainnet). The scope statement 'This tool does not take payment' sharpens it further. It stops short of naming siblings like get_art or how_to_gift, so differentiation is implied rather than explicit.

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?

Gives clear usage context: the tool is free, does not process payment, and the agent must call GET on the returned URL with its own x402 client. That is an actionable next step. It does not route the agent away from alternatives (e.g. how_to_gift for gifting), so it is clear context rather than explicit when/when-not guidance.

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