Skip to main content
Glama

Prepare a purchase

prepare_buy
Read-onlyIdempotent

Prepares the purchase of one cell (A1 to H8) for the buyer's own wallet: the price read from the contract now, and the unsigned transactions on Base that the wallet signs and sends in order, a USDC approval of the exact price (left out when the wallet already allows it) and the purchase. Canvas64 never holds a key and sends nothing. Give the wallet address to check its USDC and allowance first. If someone buys the cell before the transaction lands, it fails and nothing is charged; prepare again.

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": {
      "cell": "<cell>"
    },
    "name": "prepare_buy"
  }
}

Input Schema

NameRequiredDescriptionDefault
cellYesThe cell's address, such as D4.
walletNoOptional: the buyer's wallet address, to check its USDC balance and allowance.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.3/5.0
Behavior5/5

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

Goes well beyond the annotations: discloses that Canvas64 never holds a key and sends nothing (consistent with readOnlyHint=true), that the approval is left out when already allowed, that a competing purchase makes it fail with nothing charged, and that retry is required. This is exactly the failure-mode and side-effect context annotations cannot carry.

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?

Front-loaded with the core action and output, then the wallet check, then the race-condition caveat. It is a dense paragraph and slightly long, but each sentence carries distinct information; no filler.

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?

With no output schema, the description fully covers what is returned (price plus ordered unsigned transactions, approval sometimes omitted), how it must be used (wallet signs and sends), and the failure path. Nothing an agent needs before calling it is missing.

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 already 100%, so the schema documents both fields; the description still adds meaning by explaining why an optional 'wallet' is worth supplying (USDC/allowance check) and that the quote is for the buyer's own wallet, which the schema does not state. Baseline 3 is exceeded because the description supplies rationale rather than repeating the field docs.

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: prepares the purchase of one cell (A1–H8) for the buyer's own wallet, returning the contract price and the unsigned Base transactions. The output content (USDC approval of the exact price plus the purchase, in order) makes the operation concrete. It does not explicitly contrast itself with the sibling 'quote', which is the nearest alternative.

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 operational context: supply the wallet address to check USDC balance and allowance first, and re-run 'prepare again' if someone buys the cell before the transaction lands. It stops short of naming an alternative tool or stating an explicit when-not-to-use condition.

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