Skip to main content
Glama

cpu_buy_lot

Buy units from an open lot and have them delivered to your cell in one atomic on-chain transaction. If the lot is not open, the call stops before any token is approved, avoiding failed purchases.

Instructions

Buy units from an OPEN lot, delivered to your own cell, on-chain (needs a session). chain = [hub holding the lot, ...waypoints, your destination cell]. One atomic $CPU tx: seller price (value × pricePerUnit) + any foreign-hub transit fee, plus gas; the first buy auto-approves the sale exactly and the transit fee with ~10% headroom (a ceiling for on-chain fee drift, not a double charge). Preview the exact cost with cpu_quote_buy. Goods ship to your cell and credit only after arrival, when you cpu_finalize_delivery the returned deliveryId. If the lot is frozen — the hub raised its live sale fee above the seller tolerance — the buy reverts on-chain until the hub lowers the rate (or you pick another lot); cpu_get_lot flags it up front. Buying your own lot is allowed. The result reports the sale-leg clan economics: paid is what you were actually debited for the sale (= salediscount, the syndicate discount when buyer and seller share a syndicate), while tax is the clan tax carved from the hub fee to the owner's syndicate manager and ownerNet is the hub owner's net proceeds. The lot state is re-read first: anything other than open — evicted, still delivering, sold out, cancelled — stops the call before a single token is approved and before any transaction is sent.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
chainYesWaypoint tokenIds [hub, ...waypoints, destination] — first node is the lot Hub, last is your own revealed cell where the goods are delivered. Scout waypoints with cpu_next_hops.
lotIdYesThe lot id to buy from (from list_lots / get_lot / get_markets).
valueYesUnits to buy, as a positive integer string (≤ the lot remaining).

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. Changed1 schema field changedv0.10.0
    • changedInput schema / properties / chain / items / maximum
      Previous value: -48990New value: +29150
  2. First observedv0.8.0

TDQS

A4.7/5.0
Behavior5/5

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

No annotations are provided, so the description carries the full behavioral burden. It discloses the atomic single-transaction cost composition, the ~10% headroom ceiling on transit-fee approval, the on-chain revert behavior for frozen lots, first-buy auto-approval, allowance of buying your own lot, and the lot-state re-read guard before any token approval or transaction.

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?

The description is long but information-dense and front-loaded with the core action. Each sentence contributes a distinct operational fact (cost composition, approvals, freeze behavior, finalization, precondition guard, result fields) with no filler or repetition.

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 complex on-chain mutation with no annotations and no output schema, the description covers prerequisites, cost breakdown, fee drift headroom, failure modes, the required follow-up cpu_finalize_delivery call, and the meaning of result fields like paid, tax, and ownerNet. An agent has sufficient context to invoke the tool correctly and interpret the outcome.

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?

The input schema already documents all three parameters completely (100% coverage), so the baseline applies. The description adds some useful context, such as the cost formula value × pricePerUnit and chain construction, but most parameter meaning already lives in the schema, so the added value is modest rather than substantial.

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 states a specific action (Buy units), a precise resource (an OPEN lot), and the delivery target (your own cell), which separates it from quoting, transporting, creating, or finalizing operations. It also names related siblings like cpu_quote_buy, cpu_finalize_delivery, and cpu_get_lot within the text, so the agent can orient immediately.

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

Usage Guidelines5/5

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

It explicitly tells the agent to preview the exact cost with cpu_quote_buy, to finalize delivery with cpu_finalize_delivery using the returned deliveryId, and to detect frozen lots up front with cpu_get_lot. It also states the session prerequisite and explains that non-open lot states abort the call before any token approval or transaction, so an agent knows when this tool is not appropriate.

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

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/projectcpu/project-cpu-mcp'

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