Skip to main content
Glama
imbenrabi

Financial Modeling Prep MCP Server

getDividendsCalendar

Read-onlyIdempotent

Retrieve upcoming dividend events including record, payment, and declaration dates with dividend yields for any stock within a specified date range.

Instructions

Stay informed on upcoming dividend events with the Dividend Events Calendar API. Access a comprehensive schedule of dividend-related dates for all stocks, including record dates, payment dates, declaration dates, and dividend yields.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
from_dateNoStart date (YYYY-MM-DD)
toNoEnd date (YYYY-MM-DD)

Implementation Reference

  • MCP tool handler for 'getDividendsCalendar' - registers the tool with the MCP server, defines Zod schema for from_date and to (optional strings), and calls calendarClient.getDividendsCalendar(). Returns JSON results or error.
    server.tool(
      "getDividendsCalendar",
      "Stay informed on upcoming dividend events with the Dividend Events Calendar API. Access a comprehensive schedule of dividend-related dates for all stocks, including record dates, payment dates, declaration dates, and dividend yields.",
      {
        from_date: z.string().optional().describe("Start date (YYYY-MM-DD)"),
        to: z.string().optional().describe("End date (YYYY-MM-DD)"),
      },
      async ({ from_date: from, to }) => {
        try {
          const results = await calendarClient.getDividendsCalendar(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,
          };
        }
      }
    );
  • CalendarClient.getDividendsCalendar() - calls the FMP API endpoint '/dividends-calendar' with optional 'from' and 'to' query parameters via the parent FMPClient.get() method.
    async getDividendsCalendar(
      from?: string,
      to?: string,
      options?: {
        signal?: AbortSignal;
        context?: FMPContext;
      }
    ): Promise<Dividend[]> {
      return super.get<Dividend[]>("/dividends-calendar", { from, to }, options);
    }
  • The Dividend interface defines the shape of data returned by the getDividendsCalendar API call (symbol, date, recordDate, paymentDate, declarationDate, adjDividend, dividend, yield, frequency).
    export interface Dividend {
      symbol: string;
      date: string;
      recordDate: string;
      paymentDate: string;
      declarationDate: string;
      adjDividend: number;
      dividend: number;
      yield: number;
      frequency: string;
    }
  • The 'calendar' module adapter registration - maps the 'calendar' module name to registerCalendarTools via createModuleAdapter.
    export const CORE_MODULE_ADAPTERS: Record<string, ModuleLoader> = {
      search: createModuleAdapter('search', registerSearchTools),
      directory: createModuleAdapter('directory', registerDirectoryTools),
      analyst: createModuleAdapter('analyst', registerAnalystTools),
      calendar: createModuleAdapter('calendar', registerCalendarTools),
      chart: createModuleAdapter('chart', registerChartTools),
      company: createModuleAdapter('company', registerCompanyTools),
      cot: createModuleAdapter('cot', registerCOTTools),
      esg: createModuleAdapter('esg', registerESGTools),
      economics: createModuleAdapter('economics', registerEconomicsTools),
      dcf: createModuleAdapter('dcf', registerDCFTools),
    };
  • FMPClient.get() base method used by CalendarClient.getDividendsCalendar() to make the actual HTTP GET request to the FMP API with an API key.
    protected async get<T>(
      endpoint: string,
      params: Record<string, any> = {},
      options?: {
        signal?: AbortSignal;
        context?: { config?: { FMP_ACCESS_TOKEN?: string } };
      }
    ): Promise<T> {
      try {
        // Try to get API key from context first, fall back to instance API key
        const apiKey = this.getApiKey(options?.context);
    
        const config: AxiosRequestConfig = {
          params: {
            ...params,
            apikey: apiKey,
          },
        };
    
        if (options?.signal) {
          config.signal = options.signal;
        }
    
        const response = await this.client.get<T>(endpoint, config);
        return response.data;
      } catch (error: unknown) {
        if (axios.isAxiosError(error)) {
          const axiosError = error as AxiosError<FMPErrorResponse>;
          throw new Error(
            `FMP API Error: ${
              axiosError.response?.data?.message || axiosError.message
            }`, { cause: error }
          );
        }
        throw new Error(
          `Unexpected error: ${
            error instanceof Error ? error.message : String(error)
          }`, { cause: error }
        );
      }
    }
Behavior3/5

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

Annotations already declare readOnlyHint, idempotentHint, and openWorldHint, so the description adds limited behavioral insight. It introduces 'upcoming' (temporal context) but lacks details on pagination, response size, or potential rate limits. The 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 concise with two sentences. The first sentence is slightly marketing-oriented ('Stay informed...') but the second is more informative. Overall, it is efficient and front-loaded, though could be more direct.

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?

Despite no output schema, the description hints at response contents (record dates, yields). However, it does not specify structure (array, field names), date range behavior, or whether results are sorted. For a calendar tool, more detail on the returned format would improve completeness.

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?

Schema coverage is 100%, so baseline is 3. The description does not elaborate on the two parameters (from_date, to) beyond what the schema provides. It mentions response fields like dividend yields, but these are not parameters, adding no semantic value to the input schema.

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 retrieves a comprehensive schedule of upcoming dividend events for all stocks, specifying record dates, payment dates, declaration dates, and dividend yields. This distinguishes it from sibling tools like getDividends (which likely returns data for a single stock) and other calendars.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies use for monitoring upcoming dividend events but does not explicitly state when to use this tool over alternatives like getDividends, getEarningsCalendar, or getStockSplitCalendar. No when-not guidance is provided, leaving the agent to infer from context among many sibling tools.

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