Skip to main content
Glama

withdraw

Cash out wCPU from a cell to on-chain $CPU token in your wallet at a 1:1 ratio. Requires an authenticated session; only one withdraw can be in progress at a time.

Instructions

Cash out a cell’s wCPU (resource id 1, the Tier-5 CPU Forge output) into the on-chain $CPU token in your wallet, 1:1. Requires a session — call authenticate first. Pass the amount in whole wCPU units (e.g. "100"), at most 1,000,000 per withdraw. This debits the wCPU from the cell and mints $CPU straight to your wallet, so no $CPU approve is needed; it submits the on-chain transaction and waits for its confirmation, then reports the tx hash — check the credited $CPU with get_balance. You can have only one withdraw in flight at a time. If the on-chain step is interrupted, re-run withdraw with the same tokenId and amount to finish it — your wCPU is held until then. wCPU lives on the cell, not your wallet: selling or transferring the cell takes its wCPU with it, so withdraw before you sell.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tokenIdYesThe tokenId of a cell you own holding wCPU to cash out.
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 1,000,000 per withdraw. See the cell’s wCPU balance with get_cell.
Behavior5/5

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

With no annotations, description fully discloses behavior: debits wCPU, mints $CPU, submits on-chain tx, waits for confirmation, reports tx hash, handles interruption with re-run. Also warns that wCPU is tied to the cell. No contradictions.

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 appropriately sized for the tool's complexity. Every sentence adds value, starting with the main action, then prerequisites, constraints, and post-action steps. No wasted words.

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 complexity (on-chain mutation, constraints, error recovery) and lack of output schema, the description covers all necessary context: prerequisite, limits, behavior, expected results, and edge case handling. Fully complete.

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%, baseline 3. Description adds meaning beyond schema: explains amount units ('whole wCPU units'), max 1,000,000, and tokenId context. The 1:1 rate and conversion details are extra value.

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 wCPU) and the resource ($CPU token), with specific verb 'cash out' and details like 1:1 conversion. It distinguishes from siblings by focusing on this unique conversion process.

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?

Explicit prerequisites: 'Requires a session — call authenticate first.' Constraints: amount limits, one in-flight, re-run on interruption. Also tells to check balance with get_balance after. Provides complete when-to and how-to guidance.

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

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