Skip to main content
Glama
jackdark425

Financial Modeling Prep (FMP) MCP Server

by jackdark425

get_earnings_calendar

Retrieve upcoming earnings announcement dates for companies to track financial reporting schedules and plan investment research.

Instructions

Get upcoming earnings announcements calendar

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
fromNoStart date in YYYY-MM-DD format (optional)
toNoEnd date in YYYY-MM-DD format (optional)

Implementation Reference

  • The async handler function that executes the logic for the get_earnings_calendar tool by fetching data from the FMP API.
    async (args: z.infer<typeof DateRangeSchema>) => {
      try {
        const params: string[] = [];
        if (args.from) params.push(`from=${args.from}`);
        if (args.to) params.push(`to=${args.to}`);
        const endpoint = '/earnings-calendar' + (params.length ? `?${params.join('&')}` : '');
        const data = await fetchFMP<EarningsCalendar[]>(endpoint);
        return jsonResponse(data);
      } catch (error) {
        return errorResponse(error);
      }
    }
  • Registration of the get_earnings_calendar tool within the server instance.
    // Earnings Calendar
    server.registerTool(
      'get_earnings_calendar',
      {
        description: 'Get upcoming earnings announcements calendar',
        inputSchema: DateRangeSchema,
      },
      async (args: z.infer<typeof DateRangeSchema>) => {
        try {
          const params: string[] = [];
          if (args.from) params.push(`from=${args.from}`);
          if (args.to) params.push(`to=${args.to}`);
          const endpoint = '/earnings-calendar' + (params.length ? `?${params.join('&')}` : '');
          const data = await fetchFMP<EarningsCalendar[]>(endpoint);
          return jsonResponse(data);
        } catch (error) {
          return errorResponse(error);
        }
      }
    );
  • Input schema definition for the get_earnings_calendar tool using Zod.
    const DateRangeSchema = z.object({
      from: z.string().optional().describe('Start date in YYYY-MM-DD format (optional)'),
      to: z.string().optional().describe('End date in YYYY-MM-DD format (optional)'),
    });
Behavior2/5

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

No annotations are provided, so the description carries full burden for behavioral disclosure. It states 'Get' (implying a read operation) but doesn't mention rate limits, authentication needs, pagination, or what format the calendar data returns. For a tool with no annotations, this leaves significant behavioral gaps.

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, efficient sentence that directly states the tool's purpose without any wasted words. It's appropriately front-loaded with the core functionality, making it easy to parse quickly.

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?

Given the simple input schema (two optional parameters with full coverage) and no output schema, the description is minimally adequate but incomplete. It doesn't explain what the earnings calendar data includes (e.g., companies, dates, estimates) or behavioral aspects like rate limits, which are important for a calendar-fetching tool with no annotations.

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 both parameters ('from' and 'to') clearly documented as optional date ranges in YYYY-MM-DD format. The description adds no additional parameter semantics beyond what's in the schema, so 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 verb 'Get' and the resource 'upcoming earnings announcements calendar', making the purpose immediately understandable. It doesn't explicitly differentiate from sibling tools like 'get_economic_calendar' or 'get_company_profile', but the focus on earnings announcements is specific enough for basic clarity.

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. It doesn't mention sibling tools like 'get_economic_calendar' (for broader economic events) or 'get_company_profile' (for general company info), nor does it specify prerequisites or exclusions for usage.

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/jackdark425/aigroup-fmp-mcp'

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