Skip to main content
Glama
kea0811
by kea0811

ig_get_positions

Retrieve all open trading positions from IG Trading MCP server for forex, indices, and commodities to monitor and manage active trades effectively.

Instructions

Get all open positions

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Tool schema definition with input schema (empty object as no parameters required) and description.
      name: 'ig_get_positions',
      description: 'Get all open positions',
      inputSchema: {
        type: 'object',
        properties: {},
      },
    },
  • MCP server tool handler that calls igService.getPositions() and returns JSON stringified response.
    case 'ig_get_positions':
      const positions = await igService.getPositions();
      return {
        content: [
          {
            type: 'text',
            text: JSON.stringify(positions, null, 2),
          },
        ],
      };
  • Core implementation of get positions: makes authenticated API GET request to /positions endpoint and returns the data.
    async getPositions() {
      try {
        const response = await this.apiClient.get('/positions', 2);
        return response.data;
      } catch (error) {
        logger.error('Failed to get positions:', error.message);
        throw error;
      }
    }
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. 'Get all open positions' implies a read-only operation, but it doesn't specify whether this requires authentication, has rate limits, returns paginated results, or what format the positions are in. For a tool with zero annotation coverage, this leaves significant gaps in understanding its 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?

The description is a single, efficient sentence with zero wasted words. It's front-loaded with the core purpose ('Get all open positions'), making it immediately scannable and understandable. Every word earns its place by conveying essential information.

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 adequate as a starting point. However, without annotations or output schema, it lacks details on authentication needs, return format, or error handling. For a read operation in a financial context, more behavioral context would be helpful, but the description meets the minimum viable threshold.

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?

The tool has 0 parameters, and the schema description coverage is 100% (empty schema). The description doesn't need to explain any parameters, which is appropriate. It implies no filtering or input is required to retrieve all positions, aligning with the parameterless design.

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 'Get all open positions' clearly states the verb ('Get') and resource ('open positions'), making the purpose immediately understandable. It distinguishes from siblings like 'ig_close_position' or 'ig_update_position' by focusing on retrieval rather than modification. However, it doesn't specify whether this returns positions for the current user, account, or all accounts, which prevents a perfect score.

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. It doesn't mention prerequisites (e.g., needing to be logged in), nor does it differentiate from similar tools like 'ig_get_account_activity' which might include position data. Without any usage context or exclusions, the agent must infer when this tool is appropriate.

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