Skip to main content
Glama

Modify MT5 stop loss / take profit

modify_mt5_order
Destructive

Change the stop loss and/or take profit of an existing open position or pending order on the user's live MT5 account, by ticket. REAL MONEY: only call this after the user explicitly approved the exact ticket and the new SL/TP prices. The tool auto-detects whether the ticket is an open position (MODIFY_POSITION) or a pending order (MODIFY_ORDER) from the latest snapshot. Pass only the field you want to change; omit a field to leave it unchanged, or send it as null to clear it. Confirm the result with get_my_mt5_account. 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": {
      "ticket": "<ticket>"
    },
    "name": "modify_mt5_order"
  }
}

Input Schema

NameRequiredDescriptionDefault
ticketYesTicket of the position or pending order (from get_my_mt5_account)
stopLossNoNew SL price; omit to keep, null to clear
takeProfitNoNew TP price; omit to keep, null to clear

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.6/5.0
Behavior5/5

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

Annotations declare destructive/not-read-only/open-world, and the description goes well beyond them: real-money risk, the mandatory user-approval checkpoint, auto-detection of position vs pending order via MODIFY_POSITION/MODIFY_ORDER, and the omit-keeps / null-clears rule. That is behavior an agent cannot derive from the annotation flags alone.

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?

The risk warning and ticket approval gate are front-loaded, and the sentence order follows the calling sequence. The trailing token-setup instructions are useful but verbose enough to make the entry slightly longer than necessary.

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?

For a real-money mutation with no output schema, the definition covers risk, approval, ticket-type auto-detection, clear-vs-omit semantics, auth, and how to verify the result. Nothing an agent needs to call it safely is missing.

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 the schema descriptions already state 'omit to keep, null to clear', so the description's identical guidance is largely a restatement. It adds a little framing ('pass only the field you want to change') but no format, range, or validation detail beyond the schema.

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?

Specific verb and resource: 'Change the stop loss and/or take profit of an existing open position or pending order on the user's live MT5 account, by ticket.' The word 'existing' plus 'modify' cleanly separates it from place_mt5_order and close_mt5_order without naming them.

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?

Explicit gate: only call after the user approves the exact ticket and new SL/TP prices, and it names get_my_mt5_account as the confirmation step. It also states the precondition (personal API token, how to obtain and mount it), leaving little to inference.

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.