Skip to main content
Glama

Get open positions

get_positions
Read-onlyIdempotent

YOUR open Hyperliquid perp positions (the API key's user — no address input, identity comes from the key), for both the main wallet and the agent deposit wallet (null when no agent wallet; an {alias_of_main_wallet: true} marker when the agent trades from the main wallet itself). Each position carries side, size, entry price, position value, unrealized PnL, ROE, leverage, liquidation price (null when none), and margin used. Native perp positions come first, then HIP-3 builder-DEX positions with their dex-prefixed symbol (xyz:TSLA) and a dex field. hip3.failed_dexes lists any DEX that could not be read (meta.quality is then "partial") — positions there may be missing; hip3.included false means no HIP-3 DEX was read. Otherwise an empty list genuinely means no open positions. HIP-3 rows can be up to ~2 s old (shared cache). (Requires api:read.)

Input Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.5/5.0
Behavior5/5

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

Goes well beyond the readOnly/idempotent annotations: it discloses the main-vs-agent wallet shape, null agent wallet semantics, the alias_of_main_wallet marker, HIP-3 cache staleness of ~2s, partial-quality failure via hip3.failed_dexes, and the api:read auth requirement. This is exactly the extra context annotations cannot carry.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

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

The core statement is front-loaded, but the body is a dense run of nested parentheticals covering wallet shape, ordering, HIP-3 failure modes, and cache freshness. Most details are useful, yet the packaging makes it harder to scan than it needs to be.

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

Completeness5/5

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

There is no output schema, so the description carries the full burden of explaining returns, and it does: per-position fields, native-then-HIP-3 ordering, dex-prefixed symbols, and how to interpret empty versus partial results. An agent can call this correctly and interpret the response from the description alone.

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?

Zero parameters, so baseline is 4. The description still adds genuine value by explaining there is deliberately no address argument and that identity is derived from the key, which prevents an agent from hunting for a nonexistent filter.

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 and resource (open Hyperliquid perp positions) and immediately scopes it to the API key's own user with no address input, which separates it from holdings/balances style siblings. It also enumerates the fields returned, so an agent knows exactly what it gets without opening anything else.

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?

Clear context is given: identity comes from the key, no address parameter, and a note that an empty list genuinely means no positions. It does not explicitly route the agent away from get_holdings or get_open_orders, so the boundary with those siblings is implied rather than stated.

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