Skip to main content
Glama
imbenrabi

Financial Modeling Prep MCP Server

getLatestMergersAcquisitions

Read-onlyIdempotent

Track mergers and acquisitions with real-time data on transactions, including dates, company names, and filing links for financial analysis.

Instructions

Access real-time data on the latest mergers and acquisitions with the FMP Latest Mergers and Acquisitions API. This API provides key information such as the transaction date, company names, and links to detailed filing information for further analysis.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pageNoPage number (default: 0)
limitNoLimit on number of results (default: 100, max: 1000)

Implementation Reference

  • The tool registration and handler for 'getLatestMergersAcquisitions'. Defines the tool with Zod schema for page/limit, calls companyClient.getLatestMergersAcquisitions(), and returns the results.
    server.tool(
      "getLatestMergersAcquisitions",
      "Access real-time data on the latest mergers and acquisitions with the FMP Latest Mergers and Acquisitions API. This API provides key information such as the transaction date, company names, and links to detailed filing information for further analysis.",
      {
        page: z.number().optional().describe("Page number (default: 0)"),
        limit: z
          .number()
          .optional()
          .describe("Limit on number of results (default: 100, max: 1000)"),
      },
      async ({ page, limit }) => {
        try {
          const results = await companyClient.getLatestMergersAcquisitions(
            page,
            limit
          );
          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,
          };
        }
      }
    );
  • CompanyClient method that implements the API call to GET /mergers-acquisitions-latest with page/limit parameters. Returns Promise<MergerAcquisition[]>.
    /**
     * Get latest mergers and acquisitions
     * @param page Page number (default: 0)
     * @param limit Limit on number of results (default: 100, max: 1000)
     * @param options Optional parameters including abort signal and context
     * @returns Array of merger and acquisition data
     */
    async getLatestMergersAcquisitions(
      page?: number,
      limit?: number,
      options?: {
        signal?: AbortSignal;
        context?: FMPContext;
      }
    ): Promise<MergerAcquisition[]> {
      return super.get<MergerAcquisition[]>(
        "/mergers-acquisitions-latest",
        {
          page,
          limit,
        },
        options
      );
    }
  • The MergerAcquisition interface describing the shape of the API response data (symbol, companyName, targetedCompanyName, transactionDate, etc.).
    export interface MergerAcquisition {
      symbol: string;
      companyName: string;
      cik: string;
      targetedCompanyName: string;
      targetedCik: string;
      targetedSymbol: string;
      transactionDate: string;
      acceptedDate: string;
      link: string;
    }
  • The registerCompanyTools function that instantiates CompanyClient and registers all company tools (including getLatestMergersAcquisitions) on the MCP server.
    export function registerCompanyTools(
      server: McpServer,
      accessToken?: string
    ): void {
      const companyClient = new CompanyClient(accessToken);
Behavior4/5

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

Annotations already declare readOnlyHint and idempotentHint, indicating safe, idempotent operation. The description adds behavioral context by listing the data fields (date, company names, links), which goes beyond annotations. It does not contradict annotations and provides useful information about the returned data.

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?

Two sentences, front-loaded with purpose, no extraneous words. Every sentence adds value. Ideal conciseness.

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

Completeness4/5

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

Given no output schema, the description provides a sample of the return fields (date, names, links). It does not mention pagination or rate limits, but annotations cover idempotency and open world. For a simple list tool, it is fairly complete, though could mention default sorting or further detail.

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% for the two parameters (page, limit) with clear descriptions. The description does not add any additional meaning beyond what the schema provides. Baseline 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 tool's purpose: accessing real-time data on latest M&A, listing specific fields like transaction date, company names, and links. It is specific verb+resource but does not explicitly differentiate from the sibling tool 'searchMergersAcquisitions', which likely offers filtered search. The name 'getLatest...' implies scope, but without contrast, it's a 4.

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?

No guidance on when to use this tool versus alternatives. There is no mention of when to use it instead of 'searchMergersAcquisitions' or other tools. The description simply states what it does without context for selection.

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