ig_get_watchlist
Retrieve detailed information about a specific trading watchlist using the IG Trading API. Ideal for managing and analyzing forex, indices, and commodities data within the IG Trading MCP server.
Instructions
Get details of a specific watchlist
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| watchlistId | Yes | Watchlist ID |
Implementation Reference
- src/services/mcp-service.js:450-462 (registration)Tool registration in TOOLS array, including name, description, and input schema requiring watchlistId.name: 'ig_get_watchlist', description: 'Get details of a specific watchlist', inputSchema: { type: 'object', properties: { watchlistId: { type: 'string', description: 'Watchlist ID', }, }, required: ['watchlistId'], }, },
- src/services/mcp-service.js:744-753 (handler)MCP server request handler for ig_get_watchlist tool, delegates to IGService.getWatchlist and returns JSON response.case 'ig_get_watchlist': const watchlist = await igService.getWatchlist(args.watchlistId); return { content: [ { type: 'text', text: JSON.stringify(watchlist, null, 2), }, ], };
- src/services/ig-service.js:435-443 (handler)Core implementation of getWatchlist method in IGService class, performs API call to fetch specific watchlist data.async getWatchlist(watchlistId) { try { const response = await this.apiClient.get(`/watchlists/${watchlistId}`); return response.data; } catch (error) { logger.error(`Failed to get watchlist ${watchlistId}:`, error.message); throw error; } }