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. First observed

TDQS

A4.3/5.0
Behavior5/5

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

Annotations already cover readOnly, idempotent, openWorld, and non-destructive behavior. The description adds meaningful extra context: public on-chain data, keyless access, the exact meaning of the two boolean flags, and the ordering of returned data (aggregates first, positions last).

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 front-loaded with the core purpose and useful behavioral details, and it avoids fluff. It is fairly dense and enumerates many return fields even though an output schema exists, so it is slightly longer than strictly necessary.

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?

Given rich annotations, full schema coverage, and an output schema, the description supplies all the additional context an agent needs: keyless public access, flag semantics, usage fit, and return ordering. Nothing important is missing.

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?

Schema coverage is 100%, so the parameter is already well documented in the schema. The description reinforces that the address identifies one Hyperliquid wallet and provides a concrete example, adding a small amount of value beyond the schema.

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?

The description states a specific resource (perpetuals account state) for a specific wallet and enumerates the main fields returned, so the agent can identify it clearly. It does not explicitly distinguish itself from close siblings such as hyperliquid_account_history, so it falls just short of a 5 on sibling differentiation.

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?

It gives a concrete usage cue: "Use for 'what is this Hyperliquid wallet's position / margin / leverage'." This clearly establishes when to use the tool, but it does not mention alternatives or when-not-to-use it, so it is a 4 rather than 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.