Skip to main content
Glama
talkincode

HyperLiquid MCP Server

by talkincode

set_take_profit_stop_loss

Set take-profit and stop-loss for existing positions, using OCO to automatically cancel the other when one triggers.

Instructions

Set take profit and/or stop loss orders for an EXISTING position (OCO orders)

Args: coin: Trading pair (e.g., "BTC", "ETH") - must have an existing position take_profit_price: Take profit price (optional, can set just TP) stop_loss_price: Stop loss price (optional, can set just SL) position_size: Position size (will auto-detect from existing position if not provided)

Note: This is for EXISTING positions only. Use place_bracket_order for new positions with TP/SL. The orders will use OCO (One-Cancels-Other) behavior where executing one cancels the other.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
coinYes
position_sizeNo
stop_loss_priceNo
take_profit_priceNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior4/5

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

With no annotations, the description carries the burden and discloses important behavioral traits: OCO (One-Cancels-Other) behavior, existing position requirement, and auto-detection of position size. It does not detail all potential side effects (e.g., interaction with existing TP/SL orders) but provides substantial value beyond the schema.

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?

The description is well-structured with a clear opening sentence, an Args list, and a Note. Every sentence earns its place, front-loading the core purpose and providing necessary details without fluff.

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?

Given the tool's complexity (4 params, 1 required) and no annotations, the description is fairly complete: it covers usage context, alternatives, parameter semantics, and OCO behavior. The output schema exists, so return value explanation is not required. Minor gaps remain around error cases and precise price handling, but overall it is sufficient.

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 description coverage is 0%, so the description must compensate. It explains each parameter: coin must have an existing position, take_profit_price and stop_loss_price are optional, and position_size auto-detects. This adds meaningful semantic context beyond the bare schema, though not exhaustive (e.g., price format).

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 the tool's purpose: "Set take profit and/or stop loss orders for an EXISTING position (OCO orders)". It uses specific verbs and resource, and explicitly distinguishes from siblings like set_take_profit and set_stop_loss by combining both, and notes it's for existing positions only.

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?

The description provides explicit usage guidance: "This is for EXISTING positions only. Use place_bracket_order for new positions with TP/SL." It also clarifies optional parameters and auto-detection of position size, giving clear context on when to use this tool versus alternatives.

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/talkincode/hyperliquid-mcp-python'

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