Skip to main content
Glama

Modify Position SL/TP

modify_position
Destructive

Modify the stop loss and/or take profit of an open position on a broker account. Use this to adjust risk management on existing trades. At least one of stopLoss or takeProfit must be provided. Values are absolute price levels (e.g. stopLoss: 1.0950, not a pip distance). Setting stopLoss to the position's avgPrice performs a "break even" — moving SL to entry to eliminate risk.

Input Schema

NameRequiredDescriptionDefault
stopLossNoNew stop loss price level (absolute price, e.g. 1.0950)
positionIdYesThe position ID (from get_positions)
takeProfitNoNew take profit price level (absolute price, e.g. 1.1100)
brokerAccountIdYesThe broker account ID (from get_positions)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already carry destructiveHint=true, idempotentHint=false and openWorldHint=true. The description adds behavior the annotations cannot: at least one of stopLoss/takeProfit must be supplied, values are absolute price levels rather than pip distances, and setting SL to avgPrice yields break-even. It does not say whether the change is reversible or what happens if the position is already closed, so not a 5.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Four short sentences, zero filler, purpose front-loaded before the constraint and the unit convention. Each sentence carries a distinct piece of information the agent needs to invoke the tool correctly.

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?

For a destructive live-trading mutation with no output schema and full schema coverage, the description supplies the critical constraint and value semantics. It stops short of describing the response or failure modes (e.g. invalid price, closed position), which would be 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, but the description contributes real meaning beyond the schema: the cross-parameter constraint "at least one of stopLoss or takeProfit must be provided" (absent from the schema's required list) and the absolute-price-level semantics with a concrete example.

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 (modify) plus the exact resource and field scope: stop loss and/or take profit of an OPEN POSITION, which cleanly separates it from the order-modification siblings (modify_broker_order, update_conditional_order). An agent can tell what it does without opening the schema.

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?

"Use this to adjust risk management on existing trades" gives a clear context for invocation, and the break-even note tells the agent one concrete scenario. However, no alternatives or exclusions are named (e.g. use close_position instead, or modify_broker_order for pending orders), so it stops short of full routing guidance.

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