Skip to main content
Glama

fxapis — MetaTrader 5

Cancel a multi-account order

cancel_multi_account_order
DestructiveIdempotent

Calls off a multi-account order on the user's real broker accounts (or demo) before anything is sent. Once orders went out, close the positions with close_multi_account_order instead. Example: {"multi_account_order_id": "", "idempotency_key": ""}

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "multi_account_order_id": "<multi_account_order_id>",
      "idempotency_key": "<idempotency_key>"
    },
    "name": "cancel_multi_account_order"
  }
}

Input Schema

NameRequiredDescriptionDefault
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.
multi_account_order_idYesThe multi-account order id.

Output Schema

NameRequiredDescriptionDefault
multi_account_orderYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare destructiveHint=true and idempotentHint=true, so the mutating nature is covered. The description's added value is the timing constraint — cancellation only applies before orders are dispatched — which is real behavioral context not present in the annotations or schema.

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?

Two tight sentences front-load the action and the alternative, with no filler. The trailing example is slightly redundant given the 100%-covered schema, but it is short and demonstrates the required pair of fields.

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?

With an output schema present, return values need no explanation, and annotations cover the safety/idempotency profile. The description supplies the remaining piece an agent needs — the pre-dispatch window and the correct fallback tool — making it complete for a two-parameter mutation.

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 are thoroughly documented, including full idempotency-key retry semantics, so the schema carries the load. The inline example restates the two field names without adding new meaning, leaving this at the baseline.

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 gives a specific verb ('Calls off') and resource ('a multi-account order'), plus the scope ('on the user's real broker accounts (or demo)'). The pre-dispatch constraint ('before anything is sent') distinguishes it from close_multi_account_order 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 Guidelines5/5

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

It states the precondition implicitly (pre-dispatch) and explicitly names the alternative for the post-dispatch case: 'Once orders went out, close the positions with close_multi_account_order instead.' That is both when-to-use and when-not-to-use guidance with the sibling 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