Skip to main content
Glama
imbenrabi

Financial Modeling Prep MCP Server

getCOTList

Read-onlyIdempotent

Retrieve a comprehensive list of available Commitment of Traders (COT) reports for commodities and futures contracts. Access data on market segments to analyze trader positions and market trends.

Instructions

Access a comprehensive list of available Commitment of Traders (COT) reports by commodity or futures contract using the FMP COT Report List API. This API provides an overview of different market segments, allowing users to retrieve and explore COT reports for a wide variety of commodities and financial instruments.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The main handler for the 'getCOTList' tool. Registers the tool with the MCP server, takes no parameters, calls COTClient.getList() and returns the results as a JSON string.
    server.tool("getCOTList",
      "Access a comprehensive list of available Commitment of Traders (COT) reports by commodity or futures contract using the FMP COT Report List API. This API provides an overview of different market segments, allowing users to retrieve and explore COT reports for a wide variety of commodities and financial instruments.",
      {},
      async () => {
        try {
          const results = await cotClient.getList();
          return {
            content: [{ type: "text", text: JSON.stringify(results, null, 2) }],
          };
        } catch (error) {
          return {
            content: [
              {
                type: "text",
                text: `Error: ${
                  error instanceof Error ? error.message : String(error)
                }`,
              },
            ],
            isError: true,
          };
        }
    });
  • The helper method COTClient.getList() that makes the actual API call to /commitment-of-traders-list endpoint to fetch the list of available COT reports.
    async getList(options?: {
      signal?: AbortSignal;
      context?: FMPContext;
    }): Promise<COTList[]> {
      return super.get<COTList[]>("/commitment-of-traders-list", {}, options);
    }
  • The COTList interface defining the return type with symbol and name fields.
    export interface COTList {
      symbol: string;
      name: string;
    }
  • The registerCOTTools function that registers all COT tools (getCOTReports, getCOTAnalysis, getCOTList) with the MCP server.
    export function registerCOTTools(server: McpServer, accessToken?: string): void {
      const cotClient = new COTClient(accessToken);
    
      server.tool(
        "getCOTReports",
        "Access comprehensive Commitment of Traders (COT) reports with the FMP COT Report API. This API provides detailed information about long and short positions across various sectors, helping you assess market sentiment and track positions in commodities, indices, and financial instruments.",
        {
          symbol: z.string().describe("Commodity symbol"),
          from_date: z
            .string()
            .optional()
            .describe("Optional start date (YYYY-MM-DD)"),
          to: z
            .string()
            .optional()
            .describe("Optional end date (YYYY-MM-DD)"),
        },
        async ({ symbol, from_date: from, to }) => {
          try {
            const results = await cotClient.getReports(symbol, from, to);
            return {
              content: [{ type: "text", text: JSON.stringify(results, null, 2) }],
            };
          } catch (error) {
            return {
              content: [
                {
                  type: "text",
                  text: `Error: ${
                    error instanceof Error ? error.message : String(error)
                  }`,
                },
              ],
              isError: true,
            };
          }
        }
      );
    
      server.tool(
        "getCOTAnalysis",
        "Gain in-depth insights into market sentiment with the FMP COT Report Analysis API. Analyze the Commitment of Traders (COT) reports for a specific date range to evaluate market dynamics, sentiment, and potential reversals across various sectors.",
        {
          symbol: z.string().describe("Commodity symbol"),
          from_date: z
            .string()
            .optional()
            .describe("Optional start date (YYYY-MM-DD)"),
          to: z
            .string()
            .optional()
            .describe("Optional end date (YYYY-MM-DD)"),
        },
        async ({ symbol, from_date: from, to }) => {
          try {
            const results = await cotClient.getAnalysis(symbol, from, to);
            return {
              content: [{ type: "text", text: JSON.stringify(results, null, 2) }],
            };
          } catch (error) {
            return {
              content: [
                {
                  type: "text",
                  text: `Error: ${
                    error instanceof Error ? error.message : String(error)
                  }`,
                },
              ],
              isError: true,
            };
          }
        }
      );
    
      server.tool("getCOTList",
        "Access a comprehensive list of available Commitment of Traders (COT) reports by commodity or futures contract using the FMP COT Report List API. This API provides an overview of different market segments, allowing users to retrieve and explore COT reports for a wide variety of commodities and financial instruments.",
        {},
        async () => {
          try {
            const results = await cotClient.getList();
            return {
              content: [{ type: "text", text: JSON.stringify(results, null, 2) }],
            };
          } catch (error) {
            return {
              content: [
                {
                  type: "text",
                  text: `Error: ${
                    error instanceof Error ? error.message : String(error)
                  }`,
                },
              ],
              isError: true,
            };
          }
      });
    }
Behavior3/5

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

Annotations already indicate readOnlyHint, idempotentHint, and openWorldHint. The description adds little beyond stating the tool provides a 'comprehensive list' and uses an API. No behavioral details such as pagination, response format, or update frequency are disclosed. Description does not contradict annotations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is composed of two succinct sentences. The first sentence conveys the core purpose, and the second adds context about the API and market segments. It is front-loaded and contains no superfluous information.

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

Completeness3/5

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

The tool has no parameters and no output schema. The description explains what data is accessible but does not describe the return structure or how to interpret the list. For a simple listing tool, it is adequate but leaves the agent without details on the output format.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

With zero parameters and schema coverage at 100%, the description does not need to elaborate on parameter semantics. The mention of 'by commodity or futures contract' implies possible filtering but the schema has no properties, so the description is consistent and adds no confusion.

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

Purpose5/5

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

The description clearly states the tool's purpose: 'Access a comprehensive list of available Commitment of Traders (COT) reports by commodity or futures contract.' It uses a specific verb ('access'), identifies the resource ('list of COT reports'), and differentiates from sibling tools like getCOTAnalysis and getCOTReports by focusing on the list.

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 its siblings. It does not mention any prerequisites, exclusions, or contexts where alternative tools (e.g., getCOTReports) would be more appropriate. The lack of guidelines leaves the agent to infer usage from the tool name alone.

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

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/imbenrabi/Financial-Modeling-Prep-MCP-Server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server