Skip to main content
Glama
erscoder

Hyperliquid MCP

by erscoder

hl_set_leverage

Set leverage multiplier for a perpetual futures position on a specific asset, choosing between cross or isolated margin.

Instructions

Set leverage for a specific asset. Requires HL_PRIVATE_KEY in env.

Args: coin: Asset symbol e.g. BTC, ETH leverage: Leverage multiplier e.g. 5, 10, 20 is_cross: True for cross margin, False for isolated (default True)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
coinYes
leverageYes
is_crossNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior2/5

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

With no annotations provided, the description carries the full burden. It only states that leverage is set and requires authentication, but fails to disclose potential side effects (e.g., affecting open positions), rate limits, or error conditions.

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 concise with a clear purpose sentence, an env requirement note, and an Args block. It is front-loaded and efficient, though the Args block could be more tightly integrated.

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?

Given 3 parameters, no schema descriptions, and no annotations, the description adequately explains parameters but omits return value details (though an output schema exists). Missing information on behavioral context like prerequisites beyond env key (e.g., position existence).

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?

The description adds meaning beyond the bare schema: it explains coin as 'Asset symbol e.g. BTC, ETH', leverage as 'Leverage multiplier e.g. 5, 10, 20', and is_cross as 'True for cross margin, False for isolated'. This compensates for the 0% schema coverage.

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 leverage for a specific asset,' which is a specific verb and resource. The tool name and description distinguish it from siblings like hl_place_order and hl_close_position, which serve different purposes.

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?

The description mentions the prerequisite 'Requires HL_PRIVATE_KEY in env,' providing clear usage context. However, it does not explicitly state when to use this tool over alternatives or include any 'when not to use' guidance.

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

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