Skip to main content
Glama

set_trading_stop

Set take profit and stop loss prices for an existing position to manage risk and lock in profits.

Instructions

Set take profit and/or stop loss for a position.

Args: symbol: The trading pair, e.g., BTCUSDT. category: Product type: linear, inverse (default: linear). take_profit: Take profit price. Leave empty to not set. stop_loss: Stop loss price. Leave empty to not set. position_idx: Position index: 0 (one-way), 1 (buy side), 2 (sell side). Default: 0.

Returns: Trading stop setting result.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
symbolYes
categoryNolinear
take_profitNo
stop_lossNo
position_idxNo
Behavior2/5

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

No annotations are provided, so the description carries the full burden of disclosing behavioral traits. It describes the inputs and that it returns a result, but does not explain side effects (e.g., overwriting existing TP/SL), required permissions, error conditions, or behavior if the position does not exist. This is significant gap for a mutation tool.

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 description is a structured docstring with Args and Returns sections, front-loading the purpose. Each sentence provides necessary information without redundancy. It is relatively concise for a 5-parameter tool, though it could be slightly more compact. Overall, every sentence earns its place.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With 5 parameters, no output schema, and no annotations, the description should cover behavior more fully. It explains all parameters well but lacks details on return value structure, side effects (e.g., does it confirm success?), error handling, and idempotency. It is partially complete but leaves important information to the agent.

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 0%, so the description must add meaning beyond the schema. It explains each parameter: symbol with example, category with defaults, take_profit/stop_loss with default empty, and position_idx with options. This adds significant clarity, especially on how to leave fields unset. However, it could be more explicit about constraints (e.g., format of prices).

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?

The description clearly states 'Set take profit and/or stop loss for a position.' It specifies the action (set) and the resource (take profit/stop loss for a position), with a precise verb and object. Among sibling tools, this is distinct from order placement or cancellation tools, making its purpose unambiguous.

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

Usage Guidelines2/5

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

The description does not explicitly state when to use this tool versus alternatives. It lacks prerequisites (e.g., having an open position) and does not mention scenarios where it should not be used. While siblings like set_leverage or amend_order exist, no guidance is given for choosing this tool.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/JohnnyWic/bybit-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server