Skip to main content
Glama

get_positions

Read-only

Read open perpetual positions across main and HIP-3 DEXs, including size, entry, PnL, margin, leverage, and liquidation price. Use it to review what is open before placing, moving, or closing orders.

Instructions

Get open perp positions on every dex (main and HIP-3): coin, signed size (negative = short), entry, position value, unrealized PnL, margin, leverage and liquidation price. coin narrows to one position and, for the configured account, adds the venue's liquidation price for it. address reads any wallet. Use to see what is open before placing, moving or closing anything. For balances use get_account; for the resting stop and target use get_orders. Needs a configured account or an address; with neither it returns {error, no_account: true}. Returns {count, positions[]} (count 0 when flat), or {positions, liquidation: {source, liquidation_price}} with coin.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "get_positions"
  }
}

Input Schema

NameRequiredDescriptionDefault
coinNoCoin: a main-dex perp by name (BTC, ETH) or a HIP-3 perp as dex:SYMBOL (xyz:GOLD, xyz:BRENTOIL).
addressNoAny 0x address to read instead of the configured account (read-only; needs no key).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.6.1

TDQS

A4.8/5.0
Behavior5/5

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

Read-only intent in the annotations is reinforced, not contradicted, and the description adds behavior the annotations do not cover: the tool needs a configured account or an address and returns {error, no_account: true} with neither, address is read-only and needs no key, and coin changes the response shape. That is exactly the authentication and return-shape context an agent needs.

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?

Three sentences, front-loaded with what is returned and followed by the two siblings to avoid. The first sentence is a long field enumeration, but that is justified because there is no output schema; wording is dense but each clause carries information.

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 no output schema, the description carries the burden of return shape and does so precisely ({count, positions[]}, count 0 when flat, and the alternate {positions, liquidation:{source, liquidation_price}} form with coin). Prerequisites, failure mode, and scope are all covered for a two-parameter read tool.

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 already 100%, but the description still adds meaning: coin 'narrows to one position and, for the configured account, adds the venue's liquidation price for it', which is a side effect not expressible in the schema, and address 'reads any wallet'. The nuance that the liquidation price requires the configured account is genuinely useful.

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 ('Get open perp positions'), names the scope ('on every dex (main and HIP-3)'), and enumerates the returned fields. It also distinguishes itself from get_account and get_orders by name, so an agent can route correctly 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 explicit when-to-use ('Use to see what is open before placing, moving or closing anything') and names two concrete alternatives with their domains ('For balances use get_account; for the resting stop and target use get_orders'). Nothing is left to inference.

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