Skip to main content
Glama

waiaas_get_defi_positions

Retrieve DeFi lending positions with health factors and USD values to monitor wallet exposure and risk levels.

Instructions

Get DeFi lending positions with health factor and USD amounts.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
wallet_idNoTarget wallet ID. Required for multi-wallet sessions; auto-resolved when session has a single wallet.

Implementation Reference

  • The handler logic for the 'waiaas_get_defi_positions' tool, which fetches data from the API endpoint '/v1/wallet/positions'.
    async (args) => {
      const params = new URLSearchParams();
      if (args.wallet_id) params.set('wallet_id', args.wallet_id);
      const qs = params.toString();
      const result = await apiClient.get('/v1/wallet/positions' + (qs ? '?' + qs : ''));
      return toToolResult(result);
    },
  • The registration function for the 'waiaas_get_defi_positions' tool within the MCP server.
    export function registerGetDefiPositions(server: McpServer, apiClient: ApiClient, walletContext?: WalletContext): void {
      server.tool(
        'waiaas_get_defi_positions',
        withWalletPrefix('Get DeFi lending positions with health factor and USD amounts.', walletContext?.walletName),
        {
          wallet_id: z.string().optional().describe('Target wallet ID. Required for multi-wallet sessions; auto-resolved when session has a single wallet.'),
        },
        async (args) => {
          const params = new URLSearchParams();
          if (args.wallet_id) params.set('wallet_id', args.wallet_id);
          const qs = params.toString();
          const result = await apiClient.get('/v1/wallet/positions' + (qs ? '?' + qs : ''));
          return toToolResult(result);
        },
      );
    }
Behavior3/5

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

Discloses what data is returned (health factor and USD amounts), adding context beyond the schema. However, with no annotations provided, the description carries full burden and omits safety profile (is this read-only?), error conditions, or rate limiting behavior.

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 sentence, front-loaded with the action verb. Zero waste - every word describes the resource, operation, or return payload specificity.

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?

Adequate for a single-parameter tool with no output schema; the description compensates by mentioning return fields (health factor, USD amounts). Could be improved by noting error cases or data freshness guarantees.

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 coverage is 100% with detailed description of 'wallet_id' parameter. The description adds no additional parameter semantics, but baseline 3 is appropriate given the schema does the heavy lifting.

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?

Clear verb 'Get' and resource 'DeFi lending positions' with specific output fields (health factor, USD amounts). Specifies 'DeFi lending' domain distinguishing it from siblings like 'waiaas_hl_get_positions' (Hyperliquid) and 'waiaas_pm_get_positions', though could better clarify relationship to 'waiaas_get_health_factor'.

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?

No guidance on when to use this tool versus siblings like 'waiaas_get_health_factor' (which appears to return similar health metrics) or other position-fetching tools. No prerequisites or alternative recommendations provided.

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