getLatestMergersAcquisitions
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
| Name | Required | Description | Default |
|---|---|---|---|
| page | No | Page number (default: 0) | |
| limit | No | Limit on number of results (default: 100, max: 1000) |
Implementation Reference
- src/tools/company.ts:382-415 (handler)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 ); } - src/api/company/types.ts:88-98 (schema)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; } - src/tools/company.ts:10-15 (registration)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);