MT-MCP Docs
Tool Reference

Order Management

3 tools — auto-generated from the MCP server's tool schemas.

Generated

This page is generated from packages/server/mcp/src/tools/*.ts by pnpm docs:generate-tools. Do not edit it by hand — edit the tool's description/schema in source and regenerate.

cancel_order

Cancels a pending (limit or stop) order by ticket. Defaults to dry_run=true — set dry_run=false to execute live. Returns ORDER_NOT_FOUND if the ticket is not in pending orders. Requires the trade capability and inp_AllowTrading=true on the EA.

This tool can affect a live trading account. dry_run defaults to true — pass dry_run: false explicitly to execute for real.

Parameters

NameTypeRequiredDefaultDescription
ticketintegerYes
dry_runbooleanNotrue
terminal_idstringNo

modify_order

Modifies the price, stop_loss, take_profit, or expiry of a pending order. At least one of price, stop_loss, take_profit, or expiry must be provided. Defaults to dry_run=true — set dry_run=false to execute live. Requires the trade capability and inp_AllowTrading=true on the EA.

This tool can affect a live trading account. dry_run defaults to true — pass dry_run: false explicitly to execute for real.

Parameters

NameTypeRequiredDefaultDescription
ticketintegerYes
pricenumberNo
stop_lossnumberNo
take_profitnumberNo
expiryintegerNo
dry_runbooleanNotrue
terminal_idstringNo

partial_close

Closes a portion of an open position. volume must be less than the full position volume. Defaults to dry_run=true — set dry_run=false to execute live. Returns INVALID_PARAMETER if volume >= position volume, POSITION_NOT_FOUND if position closed between dry-run and live call. Requires the trade capability and inp_AllowTrading=true on the EA.

This tool can affect a live trading account. dry_run defaults to true — pass dry_run: false explicitly to execute for real.

Parameters

NameTypeRequiredDefaultDescription
ticketintegerYes
volumenumberYes
dry_runbooleanNotrue
terminal_idstringNo

On this page