Skip to main content
Glama

set_position_tp_sl

Destructive

Use this when the user asks to set or move the take-profit and/or stop-loss of an open Hyperliquid position. Only the legs you pass change: passing just stop_loss moves the stop and keeps the current take-profit (and vice versa). To remove a leg, cancel its order id from get_my_positions.

Input Schema

NameRequiredDescriptionDefault
symbolYesCoin symbol of the open position, e.g. BTC
stop_lossNoNew stop-loss trigger price. Omit to leave the current stop-loss as it is
take_profitNoNew take-profit trigger price. Omit to leave the current take-profit as it is

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • changedInput schema / properties / stop_loss / description
      Previous value: -"New stop-loss trigger price"New value: +"New stop-loss trigger price. Omit to leave the current stop-loss as it is"
    • changedInput schema / properties / take_profit / description
      Previous value: -"New take-profit trigger price"New value: +"New take-profit trigger price. Omit to leave the current take-profit as it is"
  2. First observed

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare destructive=true, idempotent=false, openWorld=true, so the safety profile is covered. The description still adds non-obvious behavior: only the legs passed are mutated and removal is out of scope and must go through order cancellation. It stops short of describing failure modes (e.g. no open position, invalid trigger relative to mark price).

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?

Three sentences, front-loaded with the trigger and purpose, then the partial-update rule, then the removal escape hatch. No filler and every sentence changes how an agent would call the tool.

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?

No output schema and a mutating, destructive operation, so the description reasonably covers scope, partial semantics, and the removal path. It is slightly thin on what happens on invalid input or a missing position, but nothing essential to a correct call is absent.

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 description coverage is 100% and each parameter already documents the omit-to-leave-unchanged semantics, so the schema does the heavy lifting. The description's 'only the legs you pass change' reinforces but does not add syntax, format, or range 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?

States a specific verb ('set or move') and resource ('take-profit and/or stop-loss of an open Hyperliquid position'), which cleanly separates it from sibling tools such as place_order, close_position, and cancel_order. Platform ('Hyperliquid') and position scope are explicit.

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?

Gives an explicit trigger ('when the user asks to set or move...'), states partial-update precedence clause by clause ('passing just stop_loss moves the stop and keeps the current take-profit'), and routes the removal case to a separate mechanism (cancelling the order id via get_my_positions).

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