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, no purchase price is transferred, but a network gas fee may be spent. Prepare again and ask before authorizing a higher price.

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

A3.8/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true, idempotentHint=true and destructiveHint=false, so the safety profile is partly structured; the description still adds substantial context beyond that: no key custody, nothing is sent, the approval step is omitted when the allowance already suffices, and a lost race costs gas but no purchase price. It does not state how long the quoted price stays valid or how the ordered transaction list is delivered.

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 action and scope, then the mechanics, then the failure mode — good ordering with no filler. The middle section is one very long comma-chained sentence that could be split for readability.

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 two-parameter preparation tool with no output schema, it covers custody model, chain, transaction ordering, the conditional approval step, and the front-running/gas risk. An agent has enough to call it and to explain the result to a user without opening the schema.

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 coverage is 100%, so both `cell` and `wallet` are already documented, making 3 the baseline. The description reinforces the semantics (own-wallet purchase, wallet used only for balance/allowance checking) but adds no format or edge-case detail the schema lacks.

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 to H8) for the buyer's own wallet," and enumerates exactly what it returns (the contract-read price plus the unsigned Base transactions). It doesn't differentiate itself from the sibling `quote`, which plausibly also surfaces a price, so an agent must infer the boundary.

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?

Offers a conditional instruction ("Give the wallet address to check its USDC and allowance first") and a re-run policy ("Prepare again and ask before authorizing a higher price"), which implies when to call it. However, it never states when to use `quote` or `get_cell` instead, and gives no explicit exclusion or prerequisite for the prepare-then-sign flow.

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