Skip to main content
Glama

Hyperliquid Account State

hyperliquid_account_state
Read-onlyIdempotent

Perpetuals account state for one Hyperliquid wallet address -- two separate flags (account_has_balance: non-zero account value, idle dust included; account_has_open_perp_positions: a position is open or notional / margin is non-zero), then account value, total notional, margin used, withdrawable, cross-maintenance margin, and every open perp position (coin, signed size where negative = short, entry price, position value, unrealized PnL, ROE, liquidation price, leverage, margin used, cumulative funding). Public on-chain data, keyless. Use for "what is this Hyperliquid wallet's position / margin / leverage". Returns aggregates first, positions last. e.g. {address:"0x31dea2516beee92135b96f464eeec3cf292a13f2"}.

Example tool call

This call uses example arguments supplied in the tool’s input schema.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "address": "0x31dea2516beee92135b96f464eeec3cf292a13f2"
    },
    "name": "hyperliquid_account_state"
  }
}

Input Schema

NameRequiredDescriptionDefault
addressYes0x-prefixed 42-character wallet address.

Output Schema

NameRequiredDescriptionDefault
noteNo
sourceNo
addressNo
positionsNo
snapshot_timeNo
withdrawable_usdNo
account_value_usdNo
account_has_balanceNo
open_position_countNo
total_margin_used_usdNo
total_notional_position_usdNo
account_has_open_perp_positionsNo
cross_maintenance_margin_used_usdNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedOutput schema / properties / positions / items / properties / liquidation_price / type
      Previous value: -"string"New value: +[
      +  "string",
      +  "null"
      +]
  2. First observed

TDQS

A3.9/5.0
Behavior4/5

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

Annotations already declare readOnly/idempotent/openWorld/no-destructive, so the bar is lower; the description still adds real context by confirming the data is public on-chain and keyless (no auth needed), defining the two flags precisely (idle dust counted, notional/margin non-zero), and specifying return ordering (aggregates first, positions last). No rate limits or failure modes are mentioned, keeping it off a 5.

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 scope and the flag definitions, then the field inventory, then the use case and example. The exhaustive field enumeration is somewhat redundant given an output schema exists, but it stays structured and each sentence carries information.

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?

Auth model (keyless, public), interpretation of the two boolean flags, and return ordering are all covered, and an output schema plus full annotations handle the rest. Nothing an agent needs in order to call it correctly is missing, though it stops short of edge cases such as an address with no Hyperliquid account.

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?

One parameter at 100% schema description coverage, so the schema already carries the semantics; the description only repeats the address in an example. Baseline 3 is appropriate when the schema does the work with no added format or validation detail.

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+resource+scope: 'Perpetuals account state for one Hyperliquid wallet address.' The perp-only framing implicitly separates it from spot_balances, but no sibling tool is named explicitly, so an agent must infer the boundary itself.

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?

Gives a concrete routing cue -- 'Use for "what is this Hyperliquid wallet's position / margin / leverage"' -- which places it clearly against history-type lookups. It does not name an alternative or state when-not-to-use, so it falls short of a 5.

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.