Skip to main content
Glama

cpu_buy_lot

Need goods from a marketplace? Buy units from an open lot in one atomic on-chain transaction, delivered to your cell. Preview the exact cost first, then finalize after arrival.

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.

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).
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 responsibility. It discloses the atomic transaction, the auto-approval of the sale and transit fee with ~10% headroom ('not a double charge'), delivery-only-after-arrival, the frozen-lot revert behavior, and the exact semantics of result fields (paid, tax, ownerNet). This is thorough behavioral disclosure.

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?

The description is long but well-structured, with each sentence covering a distinct aspect (purpose, chain, cost, approval, delivery, frozen lots, own-lot rule, result). It is information-dense rather than redundant, though slightly more verbose than strictly necessary.

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 purchase with no output schema, the description is remarkably complete. It covers prerequisites (session), cost formula, fee drift headroom, delivery lifecycle, frozen-lot failure mode, and return-value semantics, all of which are essential for correct invocation.

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 with 100% coverage, including chain structure, lotId source, and value constraints. The description restates chain meaning but adds no new parameter-level semantics beyond what the schema provides, so it does not exceed the baseline.

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 opens with a specific action: 'Buy units from an OPEN lot, delivered to your own cell, on-chain' — clear verb, resource, and destination. It also distinguishes itself from sibling tools by explicitly referencing cpu_quote_buy for preview and cpu_finalize_delivery for completion, making this tool's role unmistakable.

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?

The description gives explicit guidance: 'Preview the exact cost with cpu_quote_buy' and 'cpu_get_lot flags it up front' for frozen lots. It also outlines the post-purchase step requiring cpu_finalize_delivery, effectively telling the agent when to use this tool versus the alternatives.

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

Install Server

Other Tools

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