Skip to main content
Glama
talkincode

HyperLiquid MCP Server

by talkincode

place_bracket_order

Place a bracket order for a new position, combining entry, take profit, and stop loss in one transaction. Ensures TP and SL are set with OCO behavior, so they cancel each other.

Instructions

Place a bracket order for a NEW position (entry + take profit + stop loss in one order)

Args: coin: Trading pair (e.g., "BTC", "ETH") side: Order side ("buy" or "sell") size: Number of tokens/coins to trade (NOT dollar value - e.g., 0.1 for 0.1 SOL, not $20) entry_price: Entry limit price per token take_profit_price: Take profit price per token stop_loss_price: Stop loss price per token client_order_id: Optional client order ID (128-bit hex string, e.g. 0x1234567890abcdef1234567890abcdef)

IMPORTANT: The 'size' parameter is the NUMBER OF TOKENS, not dollar value. If user wants "$20 worth of SOL" at $150/SOL, calculate: $20 ÷ $150 = 0.133 SOL

Note: This creates a NEW position with TP/SL. For existing positions, use set_take_profit_stop_loss. Uses HyperLiquid's normalTpSl grouping for proper OCO behavior where TP and SL orders cancel each other.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
coinYes
sideYes
sizeYes
entry_priceYes
client_order_idNo
stop_loss_priceYes
take_profit_priceYes

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 full transparency burden. It discloses key behavioral traits: the order creates a new position, uses normalTpSl grouping for OCO behavior, and clarifies that size is in tokens not dollars. While it doesn't cover all edge cases (e.g., price slippage), it provides substantial helpful context beyond schema.

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 somewhat long but well-organized with a clear summary, Args list, and IMPORTANT note. Every sentence adds value, especially the size clarification and alternative tool mention. The length is justified for a 7-parameter tool with a common pitfall.

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 and the absence of annotations, the description covers the essential context: new position scope, OCO behavior, parameter details, and alternative tools. It does not describe return values, but the presence of an output schema reduces that need. Overall, it is complete enough for correct invocation.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Since schema descriptions are absent (0% coverage), the description fully compensates by explaining every parameter in the Args section. It gives an explicit example for size conversion ('$20 ÷ $150 = 0.133 SOL') and specifies client_order_id format as a 128-bit hex string. This is exemplary parameter documentation.

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 function: 'Place a bracket order for a NEW position (entry + take profit + stop loss in one order)'. It explicitly distinguishes from sibling tools by noting 'For existing positions, use set_take_profit_stop_loss', making it easy to select the correct tool.

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?

Usage context is explicit: it is for NEW positions only, with direct guidance to use set_take_profit_stop_loss for existing positions. The description also explains the OCO behavior ('TP and SL orders cancel each other'), clarifying when this tool is appropriate.

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