Skip to main content
Glama
kea0811
by kea0811

ig_get_accounts

Retrieve a comprehensive list of all trading accounts associated with the IG Trading API, enabling efficient account management for forex, indices, and commodities trading.

Instructions

Get list of all trading accounts

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Core implementation of ig_get_accounts tool: fetches all trading accounts from IG API via GET /accounts endpoint, handles errors.
    async getAccounts() {
      try {
        const response = await this.apiClient.get('/accounts');
        return response.data;
      } catch (error) {
        logger.error('Failed to get accounts:', error.message);
        throw error;
      }
    }
  • MCP server handler for ig_get_accounts tool: delegates to IGService.getAccounts() and returns formatted JSON response.
    case 'ig_get_accounts':
      const accounts = await igService.getAccounts();
      return {
        content: [
          {
            type: 'text',
            text: JSON.stringify(accounts, null, 2),
          },
        ],
      };
  • Tool registration in TOOLS array: defines name, description, and empty input schema for listing in MCP.
    {
      name: 'ig_get_accounts',
      description: 'Get list of all trading accounts',
      inputSchema: {
        type: 'object',
        properties: {},
      },
    },
Behavior2/5

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

No annotations are provided, so the description carries full responsibility for behavioral disclosure. While 'Get list' implies a read-only operation, it doesn't specify whether authentication is required, if there are rate limits, what format the list returns, or if it includes all accounts or only active ones. For a tool with zero annotation coverage, this leaves significant behavioral gaps unaddressed.

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 that directly states the tool's function without unnecessary words. It's front-loaded with the core purpose ('Get list of all trading accounts') and contains no redundant information. Every word earns its place in conveying essential information about what the tool does.

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?

Given the tool's simplicity (0 parameters, no output schema), the description is minimally adequate. It states what the tool does but lacks important context about authentication requirements, return format, or how it differs from sibling account tools. Without annotations or output schema, the description should provide more behavioral and contextual information to be truly complete.

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?

With 0 parameters and 100% schema description coverage, the description appropriately doesn't need to explain parameters. The schema already fully documents the empty parameter set. The description correctly focuses on the tool's purpose rather than redundant parameter details, meeting the baseline expectation for parameterless tools.

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 clearly states the action ('Get list') and resource ('all trading accounts'), making the purpose immediately understandable. It distinguishes this from other account-related tools like 'ig_get_account_activity' by focusing on listing rather than activity details. However, it doesn't specify what information is included in the list, leaving some ambiguity about the output.

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. With siblings like 'ig_get_account_activity' and 'ig_switch_account' that also relate to accounts, there's no indication of when this listing tool is appropriate versus those for specific account operations or details. The description offers no context about prerequisites, timing, or comparative use cases.

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

Related 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/kea0811/ig-trading-mcp'

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