Skip to main content
Glama

Ironflow: Hyperliquid data

Wallet positions

get_user_state
Read-only

What positions does a Hyperliquid wallet have open? Its positions right now across native and HIP-3 perps: size, entry and mark price, leverage and unrealized PnL. Use it for 'is this wallet long or short?'. For PnL over time use get_user_pnl_series; for its trading record, get_trader_profile.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "address": "<address>"
    },
    "name": "get_user_state"
  }
}

Input Schema

NameRequiredDescriptionDefault
addressYes0x-prefixed 20-byte hex address

Output Schema

NameRequiredDescriptionDefault
noticeNoA note from the API: how a market name was read, why data starts later than asked, or a next step such as a free key
addressNoWallet address (0x…)
as_of_tsNoSnapshot time, Unix milliseconds
margin_summaryNoAccount totals
asset_positionsNoOpen positions

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedOutput schema / properties / notice / description
      Previous value: -"Present when the API added a note: how a market name was read, that data starts later than asked because of the history window, or a next step such as a free key"New value: +"A note from the API: how a market name was read, why data starts later than asked, or a next step such as a free key"
  2. First observed

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare readOnlyHint and openWorldHint, so the safety profile is covered. The description adds the key behavioral fact that this is a point-in-time snapshot ('right now') rather than historical, and that HIP-3 perps are included. It stops short of noting what happens for wallets with no open positions or any freshness/rate-limit behavior, so it lands just below the top.

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?

Front-loaded with the core question, then the returned fields, then sibling routing — a sensible order. Slightly redundant in that 'Its positions right now' restates the opening question, but no sentence is wasted overall.

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?

For a single-parameter read tool with an output schema (so return values need not be explained), the description covers scope, snapshot semantics, the perp venues included, and the alternative tools. Nothing an agent needs to call it correctly is missing.

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 address parameter and its 0x-prefixed hex format are fully documented in the schema. The description adds only the mild implication that the address belongs to a Hyperliquid wallet; no format, validation, or filtering nuance beyond that. Baseline 3 applies when the schema does the heavy lifting.

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?

Names a specific verb and resource ('positions does a Hyperliquid wallet have open'), scopes it to 'native and HIP-3 perps', and enumerates what is returned (size, entry and mark price, leverage, unrealized PnL). An agent can distinguish it from get_user_pnl_series or get_trader_profile without opening any schema.

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?

Gives an explicit use case ('is this wallet long or short?') plus two named alternatives with the conditions that select them: get_user_pnl_series for PnL over time, get_trader_profile for trading record. Both when-to-use and when-not-to-use are 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.