Skip to main content
Glama

withdraw

Destructive

Record a cash outflow from the ledger in any currency. Fails if the balance is insufficient; bookkeeping only, no real payment system.

Instructions

Record a cash withdrawal from the ledger, in any currency. Fails if the balance is insufficient. Bookkeeping only — no real payment system is connected.

Args: currency: ISO-style currency code, e.g. "CNY", "USD", "AUD". amount: Amount to remove; must be > 0. idempotency_key: Reuse the same key when retrying this exact call; recorded once.

Returns: Updated cash balances, or {"status": "error", "error": ...}.

Input Schema

NameRequiredDescriptionDefault
amountYesAmount to remove; must be > 0.
currencyYesISO-style currency code, e.g. 'CNY', 'USD', 'AUD'.
idempotency_keyNoOptional client-generated key (e.g. a UUID4). When retrying this SAME call after a timeout or an unknown result, reuse the same key: the ledger records it once and later calls return {"status": "duplicate"} without touching cash or holdings. Only the key is compared, not the arguments — a different order (other symbol/units/price/amount) needs a new key, or it is silently treated as the retry.

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.45.1
    • addedInput schema / properties / idempotency_key
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "Optional client-generated key (e.g. a UUID4). When retrying this SAME call after a timeout or an unknown result, reuse the same key: the ledger records it once and later calls return {\"status\": \"duplicate\"} without touching cash or holdings. Only the key is compared, not the arguments — a different order (other symbol/units/price/amount) needs a new key, or it is silently treated as the retry.",
      +  "title": "Idempotency Key"
      +}
  2. Addedv0.34.0
  3. Removedv0.31.5
  4. Changed3 schema fields changedv0.31.4
    • addedInput schema / properties / amount / description
      Added value: +"Amount to remove; must be > 0."
    • addedInput schema / properties / amount / exclusiveMinimum
      Added value: +0
    • addedInput schema / properties / currency / description
      Added value: +"ISO-style currency code, e.g. 'CNY', 'USD', 'AUD'."
  5. First observedv0.31.0

TDQS

A3.6/5.0
Behavior4/5

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

Beyond the annotations (destructiveHint=true, readOnlyHint=false, idempotentHint=false) it discloses the insufficient-balance failure mode, the bookkeeping-only scope, and dedup behavior on key reuse. The idempotency_key emphasis sits in mild tension with idempotentHint=false, though the annotation describes default no-key behavior, so it is not a contradiction.

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 opening one-line summary is well front-loaded, but the Args block duplicates fields already fully covered by the schema, and the Returns line overlaps an existing output schema. Several sentences do not earn their place, diluting an otherwise tight core.

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 destructive ledger mutation with annotations and an output schema present, the description supplies the mutation intent, failure behavior, scope caveat, and idempotency guidance an agent needs to call it correctly. Return-value explanation is redundant given the output schema, but nothing essential is missing.

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 description coverage is 100%, so the schema already documents currency, amount, and the idempotency_key dedup semantics in far more detail. The description's Args block largely restates the schema and adds no syntax or format information beyond it, so the baseline 3 applies.

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?

Specific verb + resource ("Record a cash withdrawal from the ledger") makes the operation unmistakable and distinguishable in nature from deposit/buy/sell siblings. It stops short of explicitly naming any sibling or routing rule, so it is clear but not sibling-differentiating.

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?

The description implies when it applies (recording an outflow) and states a failure condition ("Fails if the balance is insufficient") and a scope caveat ("no real payment system is connected"). However it never says when to prefer this over deposit/buy/record_fee or how to sequence it, so usage is only implied.

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