Skip to main content
Glama

Get account positions & margin

hl_get_account
Read-onlyIdempotent

Get a perpetual account snapshot for any EVM address: equity, margin usage, withdrawable funds, and open positions with entry price, unrealized PnL, leverage, and liquidation price.

Instructions

Perp account snapshot for any address: equity, margin usage, withdrawable, and open positions (size, entry, uPnL, leverage, liquidation price). Read-only; works for any public 0x address.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
addressYesEVM 0x address (42 hex chars).

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
addressYes
positionsYes
totalNtlPosYes
accountValueYes
withdrawableYes
totalMarginUsedYes
marginUtilizationYes
Behavior4/5

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

Annotations already mark it as read-only and idempotent. The description adds that it is a snapshot (point-in-time data) and enumerates return fields, providing useful context beyond annotations.

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

Conciseness5/5

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

Single, front-loaded sentence with no unnecessary words. Each element (purpose, parameters, behavior, return data) is efficiently communicated.

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?

With only one parameter and an existing output schema, the description fully covers the tool's purpose, input, behavior, and return data. No gaps remain.

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 describes the address parameter well (EVM 0x address, 42 hex chars). The description does not add further parameter semantics, but schema coverage is 100%, so baseline 3 is appropriate.

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?

Clearly specifies it provides a perp account snapshot for any address listing equity, margin usage, withdrawable, and open positions with details. Distinguishes from siblings like hl_get_markets and hl_get_open_orders by focusing on account-specific data.

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?

States it is read-only and works for any public 0x address, implying no authorization is needed for public addresses. While it doesn't explicitly list when not to use or alternatives, the scope is clearly defined.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/johnsmithxy1mmm-sys/HyperliquidMCP'

If you have feedback or need assistance with the MCP directory API, please join our Discord server