Skip to main content
Glama

cancel_fund_order

Destructive

Cancel an in-transit fund order that was never executed and return the amount to ledger cash. Only orders still in transit can be cancelled.

Instructions

Cancel an in-transit off-exchange fund order that was never executed (the user withdrew it on the fund platform): the amount returns to ledger cash. Only orders still in transit can be cancelled — a confirmed order already holds shares (use sell to book a redemption).

Confirm with the user before calling; this moves ledger cash.

Args: order_id: The in-transit order to cancel.

Returns: Cash returned and new balance, or {"status": "error", "error": ...}.

Input Schema

NameRequiredDescriptionDefault
order_idYesorder_id of an in-transit order (status 'placed').

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.45.1

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already declare destructiveHint=true and readOnlyHint=false, but the description adds substantive context: the amount returns to ledger cash, the side effect touches ledger cash so user confirmation is required, and the error return shape is disclosed. It stops short of covering idempotency or failure-recovery behavior, keeping it short of a 5.

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?

Scope, preconditions, and the alternative are front-loaded in the first two sentences, before the Args/Returns blocks. The Returns section partially duplicates the existing output schema, which is minor waste, but the overall structure is clean.

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 tool with an output schema already present, the description covers the state precondition, the side effect, the alternative tool, and the error case. Any remaining gaps are minor and would be covered by the output schema.

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% and the schema already explains that order_id is an in-transit order with status 'placed'. The description's 'The in-transit order to cancel' adds no meaning beyond that, so it sits at the baseline for a schema-documented parameter.

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?

States a specific verb and resource ('Cancel an in-transit off-exchange fund order') with a precise qualifier ('that was never executed'). It explicitly distinguishes itself from the confirm/sell siblings by noting that confirmed orders hold shares instead.

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?

Gives an explicit precondition ('Only orders still in transit can be cancelled'), names the alternative path for confirmed orders ('use `sell` to book a redemption'), and adds an operational directive ('Confirm with the user before calling'). Nothing is left to inference.

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