Skip to main content
Glama

Place MT5 order

place_mt5_order
Destructive

Queue a real order on the user's live MT5 account through the MT5 Bridge EA. REAL MONEY: only call this after the user has explicitly approved the exact symbol, direction, volume, entry, stop loss and take profit. Never place orders on your own initiative. If the result is needs_confirmation, show every warning to the user and only retry with those keys in acknowledgeWarnings if the user says to place it anyway. Market orders expire if the EA does not pick them up within ~20s; check get_my_mt5_account for the result. For market orders, prefer slDistance/tpDistance (SL/TP as a distance from the real fill) over absolute stopLoss/takeProfit — the server re-anchors them to the actual fill price so quote-vs-fill slippage can't skew your risk. Requires a personal SocialForex API token. Create one at /mt5 (section "Connect an AI assistant (MCP)") and add it to the MCP client as header Authorization: Bearer sfmcp_....

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": {
      "symbol": "<symbol>",
      "orderType": "<orderType>",
      "volume": "<volume>"
    },
    "name": "place_mt5_order"
  }
}

Input Schema

NameRequiredDescriptionDefault
priceNoRequired for LIMIT/STOP orders, ignored for market
symbolYesBroker-neutral symbol, e.g. EURUSD, XAUUSD (EA maps suffixes)
volumeYesLots
stopLossNoAbsolute stop loss price. Omit if using slDistance, or a default (10% risk) is applied.
orderTypeYesBUY/SELL = market; *_LIMIT / *_STOP = pending at `price`
slDistanceNoMARKET orders: SL as a PRICE DISTANCE from the real fill (e.g. 5 for $5 on gold, 0.0030 for 30 pips). The server re-anchors SL to the actual fill price — use this instead of stopLoss to avoid slippage skew.
takeProfitNoAbsolute take profit price
tpDistanceNoMARKET orders: TP as a PRICE DISTANCE from the real fill. Re-anchored like slDistance.
acknowledgeWarningsNoWarnings from a previous needs_confirmation result that the user chose to override

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed5 schema fields changed
    • addedInput schema / properties / slDistance
      Added value: +{
      +  "description": "MARKET orders: SL as a PRICE DISTANCE from the real fill (e.g. 5 for $5 on gold, 0.0030 for 30 pips). The server re-anchors SL to the actual fill price — use this instead of stopLoss to avoid slippage skew.",
      +  "exclusiveMinimum": 0,
      +  "type": "number"
      +}
    • changedInput schema / properties / stopLoss / description
      Previous value: -"Stop loss price — required"New value: +"Absolute stop loss price. Omit if using slDistance, or a default (10% risk) is applied."
    • addedInput schema / properties / takeProfit / description
      Added value: +"Absolute take profit price"
    • addedInput schema / properties / tpDistance
      Added value: +{
      +  "description": "MARKET orders: TP as a PRICE DISTANCE from the real fill. Re-anchored like slDistance.",
      +  "exclusiveMinimum": 0,
      +  "type": "number"
      +}
    • changedInput schema / required
      Previous value: -[
      -  "symbol",
      -  "orderType",
      -  "volume",
      -  "stopLoss"
      -]New value: +[
      +  "symbol",
      +  "orderType",
      +  "volume"
      +]
  2. Added

TDQS

A4.8/5.0
Behavior5/5

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

Annotations declare destructiveHint and openWorldHint, but the description adds materially more: real money, mandatory human approval, a needs_confirmation result carrying warnings the user must see, ~20s market-order expiry that can silently drop the order, and a required personal API token with exact header format. This is the behavioral context an agent cannot infer from the structured fields.

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-loaded with the highest-stakes fact (REAL MONEY, requires approval) and every sentence carries operational information. It is a single dense paragraph with a few overlapping statements between description and schema (slDistance re-anchoring is explained in both), so it slightly exceeds the minimum useful length.

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?

There is no output schema, and the description compensates by explaining the needs_confirmation return shape and where to read the final outcome (get_my_mt5_account). Combined with the auth requirement and the market-order expiry window, an agent has everything needed to call this dangerous tool correctly and to fail safely.

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 100%, so the baseline is 3 and the schema already explains re-anchoring for slDistance/tpDistance. The description nonetheless adds a decision policy the schema does not state as a rule — 'for market orders, prefer slDistance/tpDistance over absolute stopLoss/takeProfit' — with the slippage rationale, which changes how the agent fills the parameters.

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: 'Queue a real order on the user's live MT5 account through the MT5 Bridge EA.' The scope (live account, real order, EA-mediated) clearly distinguishes it from siblings like close_mt5_order, modify_mt5_order and calculate_position_size without needing to open any schema.

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?

Gives explicit preconditions ('only call this after the user has explicitly approved the exact symbol, direction, volume, entry, stop loss and take profit') and an explicit prohibition ('Never place orders on your own initiative'). It also routes the agent onward: check get_my_mt5_account for the result and use the needs_confirmation/acknowledgeWarnings retry path only on user instruction.

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.