Skip to main content
Glama

waiaas_hl_get_positions

Retrieve Hyperliquid perpetual trading positions for a specific wallet, enabling portfolio tracking and risk management in decentralized finance.

Instructions

Get Hyperliquid perpetual positions for a wallet.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
wallet_idNoWallet ID. Auto-resolved for single-wallet sessions.
sub_accountNoSub-account address (hex).

Implementation Reference

  • Handler function for 'waiaas_hl_get_positions' tool.
    async (args) => {
      const params = new URLSearchParams();
      if (args.wallet_id) params.set('wallet_id', args.wallet_id);
      if (args.sub_account) params.set('subAccount', args.sub_account);
      const walletId = args.wallet_id || 'default';
      const qs = params.toString();
      const result = await apiClient.get(`/v1/wallets/${walletId}/hyperliquid/positions${qs ? '?' + qs : ''}`);
      return toToolResult(result);
    },
  • Registration of the 'waiaas_hl_get_positions' tool within the McpServer.
    server.tool(
      'waiaas_hl_get_positions',
      withWalletPrefix('Get Hyperliquid perpetual positions for a wallet.', walletContext?.walletName),
      {
        wallet_id: z.string().optional().describe('Wallet ID. Auto-resolved for single-wallet sessions.'),
        sub_account: z.string().optional().describe('Sub-account address (hex).'),
      },
      async (args) => {
        const params = new URLSearchParams();
        if (args.wallet_id) params.set('wallet_id', args.wallet_id);
        if (args.sub_account) params.set('subAccount', args.sub_account);
        const walletId = args.wallet_id || 'default';
        const qs = params.toString();
        const result = await apiClient.get(`/v1/wallets/${walletId}/hyperliquid/positions${qs ? '?' + qs : ''}`);
        return toToolResult(result);
      },
    );
Behavior2/5

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

No annotations provided, yet description adds no behavioral context beyond the implicit read-only nature of 'Get'. Omits details about return format, error handling (e.g., invalid wallet), pagination, or whether positions include unrealized PnL.

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?

Extremely efficient at 7 words. Front-loaded with specific resource identification. No redundant or wasted language.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Adequate for a simple getter with well-documented schema, but minimal given the financial domain complexity. No output schema means return value documentation falls entirely on the description, which provides none.

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 has 100% description coverage (wallet_id describes auto-resolution, sub_account notes hex format), establishing baseline 3. Description adds no parameter information, though it implicitly confirms wallet_id targets the wallet context.

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?

Clearly identifies the action (Get), platform (Hyperliquid), and resource (perpetual positions). Distinguishes from non-Hyperliquid siblings (e.g., waiaas_pm_get_positions) and spot balance tools, but fails to differentiate from waiaas_hl_get_sub_positions despite the sub_account parameter suggesting overlapping functionality.

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

Usage Guidelines2/5

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

Provides no guidance on when to use this tool versus alternatives like waiaas_hl_get_sub_positions or waiaas_get_defi_positions. No mention of prerequisites such as wallet connection or when sub_account parameter is required versus optional.

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/minhoyoo-iotrust/WAIaaS'

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