Skip to main content
Glama
kea0811
by kea0811

ig_search_markets

Search for tradeable markets on IG Trading, including forex, indices, and commodities, using specific search terms like "Oil" or "Apple" to streamline market discovery.

Instructions

Search for tradeable markets

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
searchTermYesSearch term (e.g., "Oil", "EUR/USD", "Apple")

Implementation Reference

  • Core implementation of the ig_search_markets tool: calls IG API /markets endpoint with the search term and returns the results.
    async searchMarkets(searchTerm) {
      try {
        const response = await this.apiClient.get(`/markets?searchTerm=${encodeURIComponent(searchTerm)}`);
        return response.data;
      } catch (error) {
        logger.error('Market search failed:', error.message);
        throw error;
      }
    }
  • MCP callTool handler case that invokes igService.searchMarkets and formats the response as MCP content.
    case 'ig_search_markets':
      const searchResults = await igService.searchMarkets(args.searchTerm);
      return {
        content: [
          {
            type: 'text',
            text: JSON.stringify(searchResults, null, 2),
          },
        ],
      };
  • Tool schema definition including name, description, and input schema used for tool listing and validation.
      name: 'ig_search_markets',
      description: 'Search for tradeable markets',
      inputSchema: {
        type: 'object',
        properties: {
          searchTerm: {
            type: 'string',
            description: 'Search term (e.g., "Oil", "EUR/USD", "Apple")',
          },
        },
        required: ['searchTerm'],
      },
    },
  • Registers the listTools handler that returns the TOOLS array containing ig_search_markets.
    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 it's a search operation, implying it's likely read-only and non-destructive, but doesn't confirm this explicitly. It also omits critical details like authentication requirements (though siblings suggest login might be needed), rate limits, pagination behavior, or what the search returns (e.g., a list of market IDs or names). For a tool with zero annotation coverage, this is inadequate.

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 extremely concise—just four words—and front-loaded with the core action ('Search for tradeable markets'). There's no wasted language or redundancy, making it efficient for quick comprehension, though this conciseness comes at the cost of detail in other dimensions.

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 complexity (a search tool in a trading context with many siblings), lack of annotations, and no output schema, the description is incomplete. It doesn't explain what 'tradeable markets' entails, how results are returned, or any behavioral traits. While the schema covers the single parameter well, the overall context for effective tool use is insufficient, especially compared to siblings that might overlap in functionality.

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, with the 'searchTerm' parameter well-documented in the schema itself (e.g., examples like 'Oil', 'EUR/USD'). The description adds no additional parameter information beyond implying a search functionality, which the schema already covers. According to the rules, with high schema coverage (>80%), the baseline is 3 even without param details in the description.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose3/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description 'Search for tradeable markets' clearly states the action (search) and target (tradeable markets), which is better than a tautology. However, it lacks specificity about what 'tradeable markets' means in this context (e.g., financial instruments, commodities, currencies) and doesn't distinguish it from potential sibling tools like 'ig_get_market_details' or 'ig_get_historical_prices', which might also involve market-related queries.

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. There's no mention of prerequisites (e.g., needing to be logged in), comparison to siblings like 'ig_get_market_details' (which might fetch specific market data) or 'ig_get_watchlist' (which might list saved markets), or any context about typical use cases (e.g., finding markets to trade). This leaves the agent with minimal direction.

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