Skip to main content
Glama

ig_get_watchlists

Retrieve all watchlists for forex, indices, and commodities trading via the IG Trading API. Simplify market data analysis and portfolio management by accessing curated lists of instruments.

Instructions

Get all watchlists

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Core implementation of the ig_get_watchlists tool. Fetches all watchlists from the IG API endpoint '/watchlists' and returns the response data.
    async getWatchlists() { try { const response = await this.apiClient.get('/watchlists'); return response.data; } catch (error) { logger.error('Failed to get watchlists:', error.message); throw error; } }
  • MCP server tool handler for ig_get_watchlists. Calls IGService.getWatchlists() and formats the response as MCP content.
    case 'ig_get_watchlists': const watchlists = await igService.getWatchlists(); return { content: [ { type: 'text', text: JSON.stringify(watchlists, null, 2), }, ], };
  • Input schema and tool metadata definition for ig_get_watchlists, used in tool listing and validation.
    { name: 'ig_get_watchlists', description: 'Get all watchlists', inputSchema: { type: 'object', properties: {}, }, },
  • Registration of tool list handler that exposes the ig_get_watchlists tool via the TOOLS array.
    server.setRequestHandler(ListToolsRequestSchema, async () => { return { tools: 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