Skip to main content
Glama

set_leverage

Configure leverage for a specific HyperLiquid asset and select cross or isolated margin to adjust perpetual trading risk.

Instructions

Set leverage for a specific asset on HyperLiquid. Supports cross and isolated margin modes.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
coinYesAsset symbol
apiKeyYesGDEX API key for AES encryption
isCrossNoTrue for cross margin, false for isolated
leverageYesLeverage multiplier (1-50)
walletAddressYesControl wallet address
sessionPrivateKeyYesSession private key from sign-in

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv4.11.3

TDQS

C2.9/5.0
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 behavioral burden, and it discloses almost nothing: it does not say the operation mutates account state, requires an authenticated session, applies per-asset, or what happens to existing positions. The only behavioral hint, margin mode support, merely restates the isCross parameter already in 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.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two short sentences with the action front-loaded and no filler. It is efficient, though the second sentence adds little beyond the schema's isCross field.

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

Completeness2/5

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

This is a state-mutating financial tool with five required parameters, including apiKey and sessionPrivateKey, and no output schema or annotations. The description omits required prerequisites (auth/session state), scope of effect, and side effects, leaving material gaps for an agent invoking it correctly.

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%, so the schema already documents coin, leverage range (1-50), isCross default, and the auth parameters. The description adds no format, constraint, or edge-case detail beyond the schema, so the baseline 3 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource ('Set leverage for a specific asset') and names the platform (HyperLiquid), plus the supported margin modes. It reads clearly against read-only siblings like get_trader_leverage, but the description does not explicitly contrast itself with sibling mutation tools such as open_perp_position or execute_cross_perp.

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?

There is no when-to-use guidance, no stated prerequisites, and no named alternatives. 'Supports cross and isolated margin modes' is a capability statement, not routing guidance, so an agent gets no help deciding when this tool is the right call versus setting margin through a position-opening tool.

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

Deploy Server

Other Tools