Skip to main content
Glama
psonhoang

schwab-mcp

by psonhoang

cancel_order

Cancel a working order in your Schwab account. Review order details first, then confirm to execute the cancellation.

Instructions

Cancel a live (working/pending) order in one Schwab account.

SAFETY CRITICAL / two-step confirmation flow. This tool NEVER cancels an order on the first call:

  • With confirm=False (the default, and how this must always be called the first time), the current order's details are fetched from Schwab (NOT cancelled) so the user can see exactly what they're about to cancel. You MUST show these details to the user in full and obtain their explicit confirmation before calling this tool again.

  • Only after the user has explicitly confirmed should this tool be called again with the same order_id and confirm=True. Only then is the order actually cancelled with Schwab.

Args: account_number: The plain Schwab account number as shown to the user (not the internal account hash). order_id: The Schwab order id to cancel. confirm: Must be False (default) for the initial lookup call, and True only on a follow-up call after the user has explicitly confirmed. Never default this to True.

Returns: If confirm is False: the current order's details, not cancelled. If confirm is True: confirmation that the order was cancelled.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
confirmNo
order_idYes
account_numberYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.8/5.0
Behavior5/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It clearly states that the tool NEVER cancels on the first call, that confirm=False fetches details without cancelling, and that confirm=True is required for actual cancellation. It also warns about the safety-critical nature and the need to show details to the user.

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 well-structured with clear sections, a safety warning, and a bulleted flow. It is somewhat long but every sentence earns its place given the safety-critical nature. The front-loaded warning and step-by-step explanation are appropriate for the complexity.

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 (two-step confirmation, safety-critical), the description is complete. It covers the workflow, parameter semantics, return behavior for both confirm values, and the required user confirmation step. No output schema exists, but the description explains what is returned in each mode.

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 description coverage is 0%, so the description must compensate. It explains account_number as the plain Schwab account number (not internal hash), order_id as the Schwab order id, and confirm with its default and the two-step semantics. It doesn't describe the exact format of order_id or account_number beyond that, but it adds significant meaning beyond the bare schema.

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 states a specific verb ('Cancel') and resource ('a live (working/pending) order in one Schwab account'), and distinguishes it from siblings like get_order and list_orders by emphasizing it is the cancellation tool. It also clarifies the two-step confirmation flow, which makes its purpose unmistakable.

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?

The description explicitly explains when to call the tool (first call with confirm=False to fetch details, second call with confirm=True after user confirmation) and what not to do (never default confirm to True). It also implies the alternative of using get_order for viewing details, and provides a clear safety-critical workflow.

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