Skip to main content
Glama

Prepare: withdraw from Zero Dark

darkroom_withdraw
Read-onlyIdempotent

An unsigned transaction to withdraw USDG or a stock from the wallet's own Zero Dark balance to the wallet. The owner's own call: session keys cannot withdraw. Inside a 30 second settlement window an account with orders in a book waits until the window ends. Every order in a book needs its market's smallest fill held in that stock or in USDG: withdraw below that and anyone can sweep the account's orders placed more than 10 minutes ago, the newest before the older ones, in the book the sweeper picks. Simulated from the wallet.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "wallet": "<wallet>",
      "token": "<token>",
      "amount": "<amount>"
    },
    "name": "darkroom_withdraw"
  }
}

Input Schema

NameRequiredDescriptionDefault
tokenYesUSDG or a market's symbol
amountYesA decimal amount
walletYesThe wallet's address (0x...): the transactions are built for it to sign

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A3.8/5.0
Behavior5/5

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

Beyond the annotations, the description discloses several behaviors an agent could not infer: the 30 second settlement window during which an account with orders waits, that the transaction is simulated from the wallet, and the concrete risk that withdrawing below the market's smallest fill lets anyone sweep the account's orders older than 10 minutes, newest first. That is exactly the kind of operational hazard a prepare-style tool needs to surface and it goes well past readOnly/idempotent hints.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The purpose is front-loaded and the auth constraint follows efficiently, but the final sentence about sweeping is a long nested clause ('the newest before the older ones, in the book the sweeper picks') that is hard to parse and could be split or trimmed. 'Simulated from the wallet' is also cryptic and tacked on at the end.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a three-parameter prepare tool with no output schema, the description covers what is produced (an unsigned transaction), who may call it, the timing behavior, and the primary safety hazard. Return-shape detail is unnecessary here, and the only real gap is that it never points to a sibling for the cancel/order path that avoids the sweep risk.

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?

Schema coverage is 100%, so the schema already defines wallet, token and amount, and the description does not add syntax or format detail for any of them. What it does add is domain meaning for `token` ('USDG or a stock') and for `amount` (a threshold below the smallest fill becomes unsafe), which slightly exceeds the schema but stays at the baseline for fully documented parameters.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description opens with a concrete verb+resource ('An unsigned transaction to withdraw USDG or a stock from the wallet's own Zero Dark balance to the wallet'), which separates it from the many other withdraw siblings by naming the Zero Dark balance as the source. It stops short of naming the alternative tool (e.g. darkroom_balance or account_withdraw) for cases where the balance is elsewhere, so the sibling differentiation is by scope rather than by explicit contrast.

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

Usage Guidelines3/5

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

There is one real usage constraint stated: 'The owner's own call: session keys cannot withdraw', which tells the agent when this call will not work. The order-book and sweep discussion implies conditions under which withdrawing is dangerous, but it is framed as a consequence rather than as a rule such as 'do not call while orders rest in a book' or 'use darkroom_cancel first'.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources