Skip to main content
Glama

Getting wallet Hyperliquid positions and liquidation risk

address_perp_positions
Read-onlyIdempotent

Get a wallet's Hyperliquid positions and liquidation risk without a portfolio lookup.

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": {
      "request": "<request>"
    },
    "name": "address_perp_positions"
  }
}

Input Schema

NameRequiredDescriptionDefault
requestYesComplete request for a wallet's open Hyperliquid perpetual positions.

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changed
    • addedInput schema / properties / request / additionalProperties
      Added value: +false
    • changedInput schema / properties / request / properties / filters / anyOf
      Previous value: -[
      -  {
      -    "additionalProperties": false,
      -    "description": "Filters for a wallet's open Hyperliquid perpetual positions.",
      -    "properties": {
      -      "positionType": {
      -        "anyOf": [
      -          {
      -            "type": "string"
      -          },
      -          {
      -            "type": "null"
      -          }
      -        ],
      -        "default": null,
      -        "description": "Filter by position type, such as oneWay."
      -      },
      -      "positionValueUsd": {
      -        "anyOf": [
      -          {
      -            "description": "Numeric range where from_value and to_value are optional,\nallowing for open-ended ranges (e.g., only minimum or only maximum).",
      -            "properties": {
      -              "from": {
      -                "anyOf": [
      -                  {
      -                    "type": "number"
      -                  },
      -                  {
      -                    "type": "null"
      -                  }
      -                ],
      -                "default": null,
      -                "description": "Minimum value (inclusive), optional"
      -              },
      -              "to": {
      -                "anyOf": [
      -                  {
      -                    "type": "number"
      -                  },
      -                  {
      -                    "type": "null"
      -                  }
      -                ],
      -                "default": null,
      -                "description": "Maximum value (inclusive), optional"
      -              }
      -            },
      -            "type": "object"
      -          },
      -          {
      -            "type": "null"
      -          }
      -        ],
      -        "default": null,
      -        "description": "Filter by absolute position value in USD."
      -      },
      -      "tokenSymbol": {
      -        "anyOf": [
      -          {
      -            "type": "string"
      -          },
      -          {
      -            "type": "null"
      -          }
      -        ],
      -        "default": null,
      -        "description": "Filter by a Hyperliquid perp symbol, such as BTC or HYPE."
      -      },
      -      "unrealizedPnlUsd": {
      -        "anyOf": [
      -          {
      -            "description": "Numeric range where from_value and to_value are optional,\nallowing for open-ended ranges (e.g., only minimum or only maximum).",
      -            "properties": {
      -              "from": {
      -                "anyOf": [
      -                  {
      -                    "type": "number"
      -                  },
      -                  {
      -                    "type": "null"
      -                  }
      -                ],
      -                "default": null,
      -                "description": "Minimum value (inclusive), optional"
      -              },
      -              "to": {
      -                "anyOf": [
      -                  {
      -                    "type": "number"
      -                  },
      -                  {
      -                    "type": "null"
      -                  }
      -                ],
      -                "default": null,
      -                "description": "Maximum value (inclusive), optional"
      -              }
      -            },
      -            "type": "object"
      -          },
      -          {
      -            "type": "null"
      -          }
      -        ],
      -        "default": null,
      -        "description": "Filter by unrealized profit or loss in USD."
      -      }
      -    },
      -    "type": "object"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]New value: +[
      +  {
      +    "additionalProperties": false,
      +    "description": "Filters for a wallet's open Hyperliquid perpetual positions.",
      +    "properties": {
      +      "positionType": {
      +        "anyOf": [
      +          {
      +            "type": "string"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "default": null,
      +        "description": "Filter by position type, such as oneWay."
      +      },
      +      "positionValueUsd": {
      +        "anyOf": [
      +          {
      +            "additionalProperties": false,
      +            "description": "Numeric range where from_value and to_value are optional,\nallowing for open-ended ranges (e.g., only minimum or only maximum).",
      +            "properties": {
      +              "from": {
      +                "anyOf": [
      +                  {
      +                    "type": "number"
      +                  },
      +                  {
      +                    "type": "null"
      +                  }
      +                ],
      +                "default": null,
      +                "description": "Minimum value (inclusive), optional"
      +              },
      +              "to": {
      +                "anyOf": [
      +                  {
      +                    "type": "number"
      +                  },
      +                  {
      +                    "type": "null"
      +                  }
      +                ],
      +                "default": null,
      +                "description": "Maximum value (inclusive), optional"
      +              }
      +            },
      +            "type": "object"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "default": null,
      +        "description": "Filter by absolute position value in USD."
      +      },
      +      "tokenSymbol": {
      +        "anyOf": [
      +          {
      +            "type": "string"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "default": null,
      +        "description": "Filter by a Hyperliquid perp symbol, such as BTC or HYPE."
      +      },
      +      "unrealizedPnlUsd": {
      +        "anyOf": [
      +          {
      +            "additionalProperties": false,
      +            "description": "Numeric range where from_value and to_value are optional,\nallowing for open-ended ranges (e.g., only minimum or only maximum).",
      +            "properties": {
      +              "from": {
      +                "anyOf": [
      +                  {
      +                    "type": "number"
      +                  },
      +                  {
      +                    "type": "null"
      +                  }
      +                ],
      +                "default": null,
      +                "description": "Minimum value (inclusive), optional"
      +              },
      +              "to": {
      +                "anyOf": [
      +                  {
      +                    "type": "number"
      +                  },
      +                  {
      +                    "type": "null"
      +                  }
      +                ],
      +                "default": null,
      +                "description": "Maximum value (inclusive), optional"
      +              }
      +            },
      +            "type": "object"
      +          },
      +          {
      +            "type": "null"
      +          }
      +        ],
      +        "default": null,
      +        "description": "Filter by unrealized profit or loss in USD."
      +      }
      +    },
      +    "type": "object"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • changedInput schema / properties / request / properties / orderBy / anyOf
      Previous value: -[
      -  {
      -    "items": {
      -      "description": "One sort rule for a wallet's open Hyperliquid perpetual positions.",
      -      "properties": {
      -        "direction": {
      -          "description": "Sort direction. Use DESC for the largest values first.",
      -          "enum": [
      -            "ASC",
      -            "DESC",
      -            "asc",
      -            "desc"
      -          ],
      -          "type": "string"
      -        },
      -        "field": {
      -          "description": "Position field to sort by.",
      -          "enum": [
      -            "leverage_value",
      -            "position_value_usd",
      -            "entry_price_usd",
      -            "liquidation_price_usd",
      -            "unrealized_pnl_usd",
      -            "size",
      -            "token_symbol",
      -            "position_type"
      -          ],
      -          "type": "string"
      -        }
      -      },
      -      "required": [
      -        "field",
      -        "direction"
      -      ],
      -      "type": "object"
      -    },
      -    "type": "array"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]New value: +[
      +  {
      +    "items": {
      +      "additionalProperties": false,
      +      "description": "One sort rule for a wallet's open Hyperliquid perpetual positions.",
      +      "properties": {
      +        "direction": {
      +          "description": "Sort direction. Use DESC for the largest values first.",
      +          "enum": [
      +            "ASC",
      +            "DESC",
      +            "asc",
      +            "desc"
      +          ],
      +          "type": "string"
      +        },
      +        "field": {
      +          "description": "Position field to sort by.",
      +          "enum": [
      +            "leverage_value",
      +            "position_value_usd",
      +            "entry_price_usd",
      +            "liquidation_price_usd",
      +            "unrealized_pnl_usd",
      +            "size",
      +            "token_symbol",
      +            "position_type"
      +          ],
      +          "type": "string"
      +        }
      +      },
      +      "required": [
      +        "field",
      +        "direction"
      +      ],
      +      "type": "object"
      +    },
      +    "type": "array"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
  2. Added

TDQS

A3.6/5.0
Behavior3/5

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

Annotations already declare readOnlyHint, idempotentHint, openWorldHint and destructiveHint=false, so the safety profile is covered. The description's only behavioral addition is that liquidation risk is computed and that no full portfolio call is required, which is modest value; scope limits (e.g. only Hyperliquid, only open perps) are implied but not spelled out beyond the name.

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?

One sentence, front-loaded with the core action and the key differentiator at the end. Nothing is wasted and nothing needs re-reading.

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?

An output schema exists and the input schema is fully documented, so the description need not explain parameters or return shape. What it lacks is only marginal: explicit sibling routing and any note on scope limits such as which chains or position types are covered.

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% and every nested field — address, filters, orderBy, valid sort fields and the default sort — is documented inline. The description adds no parameter meaning of its own, which is acceptable here but earns only the baseline.

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 names a specific verb-and-resource pair: fetching a wallet's Hyperliquid perpetual positions plus liquidation risk. It is clearly distinguishable from portfolio-style siblings via the phrase 'without a portfolio lookup', though it never names the alternative tool directly.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

'Without a portfolio lookup' implies this is the lightweight option when only perp exposure matters, which is useful implicit routing. However, there is no explicit when-to-use/when-not-to-use statement and no named alternative such as address_portfolio, so the agent must infer the selection rule.

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.

Resources