Skip to main content
Glama

cpu_withdraw

Convert a cell's wCPU into on-chain $CPU at 1:1, sending tokens to your wallet. Handles partial withdrawals when the emission budget is limited; sell the cell only after withdrawing.

Instructions

Cash out a cell’s wCPU (resource id 1, the CPU Forge output) to the on-chain $CPU token in your wallet, 1:1 (needs a session — cpu_authenticate first; you must own the cell). Pass the amount in whole wCPU units up to the cell’s wCPU balance; it debits the cell and mints $CPU to your wallet (no approve needed). If the on-chain $CPU emission budget cannot cover the full amount, only a partial tranche executes — up to what remains — and the rest stays in the cell; the result reports the requested and executed amounts separately. Waits for confirmation and returns the tx hash — check the result with cpu_get_balance. wCPU lives on the cell, so selling or transferring the cell takes it along: withdraw before you sell.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
amountYesHow much wCPU (resource id 1) to convert to on-chain $CPU, 1:1, in whole units (e.g. "100"). Must be greater than 0 and at most the cell’s wCPU balance. See it with get_cell.
tokenIdYesThe tokenId of a cell you own holding wCPU to cash out.
Behavior5/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It thoroughly covers side effects (debits cell, mints $CPU), partial execution behavior, lack of approve requirement, session dependency, ownership requirement, and the fact that wCPU lives on the cell. It also explains result reporting (requested vs executed amounts) and confirmation behavior.

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 well-structured: it starts with the core purpose, then details parameters, behavioral edge cases, result handling, and a final warning. Every sentence adds value and no redundant information is present. It is concise yet comprehensive for a tool with this complexity.

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?

Given the tool's two parameters, no output schema, and no annotations, the description provides a complete picture: prerequisites, usage, side effects, partial execution, result format, and related tools. It even anticipates a common misuse (selling the cell). No important aspect is left unexplained.

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?

The schema already documents both parameters with 100% coverage, so the baseline is 3. The description adds extra meaning by explaining 'wCPU (resource id 1, the CPU Forge output)' and the 1:1 conversion, as well as the partial execution nuance. It also reminds to see the balance with `get_cell`, which goes beyond the schema.

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 clearly states the tool's purpose: 'Cash out a cell’s wCPU... to the on-chain $CPU token in your wallet, 1:1'. It uses a specific verb ('cash out') and identifies the resource and conversion ratio, distinguishing it from sibling operations like cpu_swap or cpu_mint.

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?

The description provides explicit prerequisites (requires `cpu_authenticate` first, must own the cell), amount limits, and a caution about selling/transferring the cell. It also points to `cpu_get_balance` for verification. However, it does not explicitly discuss alternatives or when not to use this tool, leaving a small gap in the guidelines.

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