Skip to main content
Glama
PatrickSUDO

firstrade-mcp-server

by PatrickSUDO

cancel_order

Cancel an open Firstrade order by providing its order ID. Returns a JSON confirmation of the cancellation result.

Instructions

Cancel an open order by order_id (e.g. 'G42621-1569').

Args: order_id: The order ID returned by place_stock_order or place_option_order.

Returns JSON with cancellation result.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
order_idYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.3/5.0
Behavior3/5

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

With no annotations, the description carries the behavioral burden. It discloses that the tool acts on open orders, requires a specific order id, and returns a JSON cancellation result. However, it does not mention irreversibility, failure conditions for already-filled or already-cancelled orders, or permission requirements.

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 compact and well-structured: action sentence, Args block, and Returns note. Every sentence adds necessary information with no filler or redundancies.

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 one-parameter cancellation tool, the description covers the action, eligibility ('open order'), parameter provenance, and response format. A small gap remains around error behavior and irreversibility, but the presence of an output schema reduces the need to explain return structure in detail.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, but the description fully compensates for the single parameter. It explains that order_id is the ID returned by place_stock_order or place_option_order and provides a realistic example, adding meaning well beyond the schema's simple string type.

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 ('Cancel'), the resource ('an open order'), and the identifying key ('order_id'), with a concrete example format. This distinguishes it from sibling placement/preview/get tools without ambiguity.

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

Usage Guidelines4/5

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

It gives clear context by specifying that the order_id comes from place_stock_order or place_option_order, which tells the agent what prerequisite needs to exist. It does not explicitly enumerate when not to use the tool, but the verb 'Cancel' and the 'open order' restriction make the intended scenario clear.

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