Skip to main content
Glama

fxapis — MetaTrader 5

Move stop loss / take profit

modify_position
DestructiveIdempotent

Moves a position's stop loss or take profit on the user's real broker account (or demo); null removes a level. Remove a stop loss only when the user asks. Example: {"account_id": "", "position_id": "", "stop_loss": "1.08000", "idempotency_key": ""}

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
stop_lossNo
account_idYesThe fxapis account id (a UUID) from list_accounts — not the MT5 login number.
position_idYesThe position ticket: `brokerPositionId` from list_positions.
take_profitNo
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.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
orderYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.8/5.0
Behavior4/5

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

Annotations already declare destructiveHint=true, idempotentHint=true and openWorldHint=true, so the bar is lower. The description still adds real value: it discloses that changes land on the user's live broker account, that null deletes a protective level, and warns against removing stops unprompted.

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 action and its target, followed by the one safety caveat and a compact example. Only mild redundancy: the JSON sample largely restates field names already visible in the schema.

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 mutation tool with an output schema (so returns need no explanation) and annotations covering safety and idempotency, the description covers the remaining agent-facing concerns: live-account impact, removal semantics, and the caution about deleting stops.

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 60% and the schema itself documents every parameter, including the null-removes-it semantics and the absolute-price rule. The example payload maps names to sample values but adds no syntax or format detail beyond the schema, so this sits at the baseline.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource: moving a position's stop loss or take profit on a real (or demo) broker account. The scope sentence makes clear it mutates an existing position rather than opening or closing one, though no sibling is named for contrast.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

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

It supplies one explicit conditional ('Remove a stop loss only when the user asks') and an example call, which implies usage. But it never says when to use this versus close_position or place_pending_order, so alternatives remain inferred.

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