Skip to main content
Glama

cpu_withdraw

Cash out wCPU from your cell to on-chain $CPU tokens at a 1:1 rate. Requires authentication and cell ownership.

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), 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, the description fully discloses behavior: debits the cell, mints $CPU, waits for confirmation, returns tx hash. It also mentions no approve needed and warns that wCPU is tied to the cell.

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 a single paragraph that front-loads the main action. It contains necessary detail but could be slightly more concise. However, it is well-structured and informative.

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?

Without an output schema, the description covers return value (tx hash) and suggests checking with cpu_get_balance. It includes prerequisites, constraints, and consequences, making it fully complete for a 2-param tool.

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 100% and already describes parameters. Description adds value by providing examples (e.g., '100'), clarifying units ('whole wCPU units'), and referencing get_cell to check balance.

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 action: 'Cash out a cell’s wCPU to the on-chain $CPU token'. It includes the resource ID, conversion rate, and prerequisites. Differentiates from siblings by being the only tool for converting wCPU to $CPU.

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 specifies when to use (to convert wCPU to $CPU) and prerequisites: need a session via cpu_authenticate and own the cell. It warns about selling the cell. Does not explicitly state when not to use, but context is clear.

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

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