Skip to main content
Glama

waiaas_hl_get_sub_positions

Retrieve current trading positions for a Hyperliquid sub-account to monitor portfolio holdings and exposure in decentralized finance markets.

Instructions

Get positions for a Hyperliquid sub-account.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
wallet_idNoWallet ID.
sub_accountYesSub-account address (hex, 42 chars).

Implementation Reference

  • The handler function that executes the `waiaas_hl_get_sub_positions` tool.
    async (args) => {
      const walletId = args.wallet_id || 'default';
      const result = await apiClient.get(`/v1/wallets/${walletId}/hyperliquid/sub-accounts/${args.sub_account}/positions`);
      return toToolResult(result);
    },
  • Tool registration for `waiaas_hl_get_sub_positions`.
    server.tool(
      'waiaas_hl_get_sub_positions',
      withWalletPrefix('Get positions for a Hyperliquid sub-account.', walletContext?.walletName),
      {
        wallet_id: z.string().optional().describe('Wallet ID.'),
        sub_account: z.string().describe('Sub-account address (hex, 42 chars).'),
      },
      async (args) => {
        const walletId = args.wallet_id || 'default';
        const result = await apiClient.get(`/v1/wallets/${walletId}/hyperliquid/sub-accounts/${args.sub_account}/positions`);
        return toToolResult(result);
      },
    );
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. The verb 'Get' implies a read-only operation, but the description lacks details on error handling (e.g., invalid sub-account address), rate limits, pagination, or the structure/format of the returned positions data.

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?

The description is a single, efficient sentence of seven words. It is front-loaded with the action verb, contains no redundant or filler text, and immediately communicates the tool's purpose without wasted words.

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?

For a tool with only two flat parameters and comprehensive schema documentation, the description is minimally adequate. However, given the absence of an output schema and annotations, it should ideally describe the return value structure (e.g., 'returns open perpetual positions') and clarify that 'wallet_id' is optional while 'sub_account' is required.

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?

The input schema has 100% description coverage, establishing a baseline of 3. The schema adequately documents both parameters ('Wallet ID' and 'Sub-account address (hex, 42 chars)'). The description does not add additional parameter context (e.g., explaining the relationship between wallet_id and sub_account, or providing format examples), but none is required given the comprehensive 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 uses a specific verb ('Get') with a clear resource ('positions') and scope ('Hyperliquid sub-account'). The inclusion of 'Hyperliquid' distinguishes it from generic DeFi position tools like 'waiaas_get_defi_positions', and 'sub-account' distinguishes it from the sibling 'waiaas_hl_get_positions'. However, it does not explicitly clarify when to use this versus the main account positions tool.

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?

The description provides no guidance on when to use this tool versus alternatives like 'waiaas_hl_get_positions' or 'waiaas_get_defi_positions'. It does not mention prerequisites (e.g., that a sub-account address might need to be obtained from 'waiaas_hl_list_sub_accounts' first) or filtering capabilities.

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