Skip to main content
Glama

fxapis — MetaTrader 5

Cancel a pending order

cancel_order
DestructiveIdempotent

Cancels a pending order on the user's real broker account (or demo) that has not triggered. If it triggered there is a position to close instead. Example: {"order_id": "", "idempotency_key": ""}

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
order_idYesThe fxapis id of the pending order.
idempotency_keyYesA unique string you generate for THIS action, e.g. a fresh UUID. If a call fails or times out and you retry the same action, send the SAME key: fxapis then returns the first result instead of acting twice. Use a new key only for a genuinely new action.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
orderYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.9/5.0
Behavior4/5

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

Annotations already declare destructive/idempotent/openWorld, so the bar is lower; the description still adds real behavioral context beyond them — the tool only applies to un-triggered orders and operates on a live or demo broker account, and it supplies an idempotency_key example.

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?

Three short sentences with the core action and constraint front-loaded, followed by a compact example. Efficient, though the example largely restates what the schema already shows.

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?

An output schema exists (so return values need no explanation) and annotations cover the safety profile; the description adds the trigger-state constraint and account-type scope. Fully adequate for calling the tool correctly.

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%, and both parameters (order_id, idempotency_key) are fully described in the schema, including retry semantics. The description only adds a redundant example, so baseline 3 is appropriate.

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?

States a specific verb and resource ("Cancels a pending order") plus meaningful scope ("on the user's real broker account (or demo) that has not triggered"). It is clear which order type it targets, though it never explicitly distinguishes itself from the sibling cancel_multi_account_order.

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?

Gives a genuine usage condition and exclusion: use it for orders "that have not triggered," and if triggered "there is a position to close instead" — routing toward close_position. Strong, though the alternative tool is described conceptually rather than named.

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