Skip to main content
Glama

fxapis — MetaTrader 5

Place a market order

place_market_order
DestructiveIdempotent

Opens a position at market on the user's real broker account (or demo) and waits for the broker; confirm account, symbol, side and volume with the user first. On ORDER_UNRESOLVED never resend, poll get_order. Example: {"account_id": "", "symbol": "EURUSD", "side": "buy", "volume": "0.10", "idempotency_key": ""}

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sideYesbuy or sell.
symbolYesThe symbol exactly as this broker names it, e.g. "EURUSD" — some brokers add a suffix such as "EURUSD.r".
volumeYesOrder size. In lots, preferably as a string: "0.01" is a micro lot, "1.00" a standard lot.
commentNoOptional note stored on the order. MT5 keeps the first 17 characters after our reference.
stop_lossNoOptional stop loss. Below entry for a buy, above for a sell. An absolute price (e.g. "1.08450"), not a distance in pips or points.
account_idYesThe fxapis account id (a UUID) from list_accounts — not the MT5 login number.
take_profitNoOptional take profit. Above entry for a buy, below for a sell. An absolute price (e.g. "1.08450"), not a distance in pips or points.
client_order_idNoOptional reference of your own, echoed back on the 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.
deviation_pointsNoMaximum slippage in points. Too small invites requotes.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
orderYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already declare destructiveHint, idempotentHint and openWorldHint, so the bar is lower. The description still adds real value beyond them: it discloses that the call blocks/waits for the broker and prescribes never resending on ORDER_UNRESOLVED but polling get_order instead — non-obvious retry behavior not encoded in any structured field.

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?

Front-loads purpose, then preconditions, then error handling, then an example — a sensible ordering with no filler sentences. The semicolon-joined clauses are dense but each carries distinct operational information.

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-value documentation isn't required, and the description still covers the key edge state (ORDER_UNRESOLVED). For a destructive real-money order on a 10-param tool, it is nearly complete; margin/permission prerequisites would close the remaining gap.

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 coverage is 100%, so the baseline is 3. The description goes slightly further by naming the four fields the agent must confirm with the user and by showing a complete valid payload including the fresh-UUID idempotency_key, illustrating how the required fields combine in practice.

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 ('opens a position at market on the user's real broker account') and names the environment (real or demo). An agent can distinguish this from place_pending_order and place_multi_account_order by the 'at market' + single-account scope.

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 an explicit precondition ('confirm account, symbol, side and volume with the user first') and routes the agent to get_order on ORDER_UNRESOLVED. It stops short of explicitly contrasting itself with the sibling order-placement tools (pending vs multi-account), which would have made it a 5.

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