Skip to main content
Glama
kea0811
by kea0811

ig_get_client_sentiment

Analyzes client sentiment for specific markets using market IDs to inform trading decisions, integrated with the IG Trading API for forex, indices, and commodities.

Instructions

Get client sentiment for markets

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
marketIdsYesList of market IDs

Implementation Reference

  • Core implementation of the tool: fetches client sentiment data from IG API endpoint /clientsentiment using the provided marketIds.
    async getClientSentiment(marketIds) {
      if (!Array.isArray(marketIds)) {
        marketIds = [marketIds];
      }
    
      try {
        const marketIdString = marketIds.join(',');
        const response = await this.apiClient.get(`/clientsentiment?marketIds=${encodeURIComponent(marketIdString)}`);
        return response.data;
      } catch (error) {
        logger.error('Failed to get client sentiment:', error.message);
        throw error;
      }
    }
  • MCP server handler for the tool: calls igService.getClientSentiment and formats response as MCP content.
    case 'ig_get_client_sentiment':
      const sentiment = await igService.getClientSentiment(args.marketIds);
      return {
        content: [
          {
            type: 'text',
            text: JSON.stringify(sentiment, null, 2),
          },
        ],
      };
  • Tool schema definition including input validation for marketIds array.
    {
      name: 'ig_get_client_sentiment',
      description: 'Get client sentiment for markets',
      inputSchema: {
        type: 'object',
        properties: {
          marketIds: {
            type: 'array',
            items: {
              type: 'string',
            },
            description: 'List of market IDs',
          },
        },
        required: ['marketIds'],
      },
    },
  • Registration of tool list handler which returns the TOOLS array containing 'ig_get_client_sentiment'.
    server.setRequestHandler(ListToolsRequestSchema, async () => {
      return {
        tools: TOOLS,
      };
    });
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. It states the action ('Get') but doesn't cover critical aspects such as authentication requirements, rate limits, data freshness, or response format. This is a significant gap for a tool with no annotation coverage.

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 no wasted words. It's front-loaded with the core action and resource, making it easy to parse quickly.

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

Completeness2/5

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

Given the lack of annotations and output schema, the description is incomplete. It doesn't explain what 'client sentiment' entails, how the data is returned, or any behavioral traits, leaving gaps in understanding for a tool that likely involves data retrieval.

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 schema description coverage is 100%, with the parameter 'marketIds' clearly documented as a list of market IDs. The description adds no additional meaning beyond this, but the schema adequately covers the parameter, meeting the baseline for high coverage.

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 verb ('Get') and resource ('client sentiment for markets'), making the purpose immediately understandable. It doesn't differentiate from siblings like 'ig_get_account_activity' or 'ig_get_market_details', but it's specific enough to identify the tool's function.

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 is provided on when to use this tool versus alternatives. The description lacks context about prerequisites, timing, or comparisons to sibling tools like 'ig_get_account_activity' or 'ig_get_market_details', leaving the agent to infer usage.

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