Skip to main content
Glama
kea0811
by kea0811

ig_add_to_watchlist

Add a specific market instrument (epic) to a designated watchlist on IG Trading for easy tracking and analysis. Requires watchlist ID and epic details.

Instructions

Add an epic to a watchlist

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
epicYesEpic to add
watchlistIdYesWatchlist ID

Implementation Reference

  • Core handler function that executes the tool logic by sending a PUT request to the IG API to add the specified epic to the watchlist.
    async addToWatchlist(watchlistId, epic) {
      try {
        const response = await this.apiClient.put(`/watchlists/${watchlistId}`, { epic });
        return response.data;
      } catch (error) {
        logger.error(`Failed to add ${epic} to watchlist:`, error.message);
        throw error;
      }
    }
  • MCP server dispatch handler for the tool that calls the IGService method and formats the response.
    case 'ig_add_to_watchlist':
      const addResult = await igService.addToWatchlist(args.watchlistId, args.epic);
      return {
        content: [
          {
            type: 'text',
            text: JSON.stringify(addResult, null, 2),
          },
        ],
      };
  • Tool schema definition including name, description, and input schema used for registration and validation.
    {
      name: 'ig_add_to_watchlist',
      description: 'Add an epic to a watchlist',
      inputSchema: {
        type: 'object',
        properties: {
          watchlistId: {
            type: 'string',
            description: 'Watchlist ID',
          },
          epic: {
            type: 'string',
            description: 'Epic to add',
          },
        },
        required: ['watchlistId', 'epic'],
      },
    },
  • Registers all tools including ig_add_to_watchlist by setting the ListToolsRequestHandler to return the TOOLS array.
    server.setRequestHandler(ListToolsRequestSchema, async () => {
      return {
        tools: TOOLS,
      };
    });
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states the action is 'Add', implying a mutation, but does not disclose any behavioral traits such as permissions required, rate limits, error conditions, or what happens if the epic already exists in the watchlist. This leaves significant gaps for an AI agent.

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, concise sentence that directly states the tool's purpose without any unnecessary words. It is front-loaded and efficient, making it easy to understand at a glance.

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 tool is a mutation operation (adding to a watchlist) with no annotations and no output schema, the description is incomplete. It lacks details on behavioral aspects like success/failure responses, side effects, or dependencies, which are crucial for proper tool invocation in this context.

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 clear definitions for 'epic' and 'watchlistId'. The description does not add any additional meaning beyond what the schema provides, such as format examples or constraints. Since schema coverage is high, the baseline score of 3 is appropriate.

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 action ('Add') and the target ('an epic to a watchlist'), which is specific and unambiguous. However, it does not differentiate this tool from potential sibling tools like 'ig_create_watchlist' or 'ig_get_watchlist', which might handle watchlist operations differently, so it lacks sibling distinction.

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. For example, it does not specify if this is for adding new epics only, updating existing ones, or if there are prerequisites like having a watchlist created first. No context or exclusions are mentioned.

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