searchCompaniesBySymbol
Find company information and SEC filings by stock symbol. Access essential details and regulatory documents from the Financial Modeling Prep API.
Instructions
Find company information and regulatory filings using a stock symbol with the FMP SEC Filings Company Search By Symbol API. Quickly access essential company details based on stock ticker symbols.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| symbol | Yes | Stock symbol |
Implementation Reference
- src/tools/sec-filings.ts:232-260 (handler)MCP tool registration and handler for 'searchCompaniesBySymbol'. Defines the tool with Zod schema (symbol: string), calls the client method, and returns JSON-serialized results.
server.tool( "searchCompaniesBySymbol", "Find company information and regulatory filings using a stock symbol with the FMP SEC Filings Company Search By Symbol API. Quickly access essential company details based on stock ticker symbols.", { symbol: z.string().describe("Stock symbol"), }, async ({ symbol }) => { try { const results = await secFilingsClient.searchCompaniesBySymbol({ symbol, }); 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, }; } } ); - Client method that makes the actual HTTP GET request to the FMP API endpoint `/sec-filings-company-search/symbol` with the symbol parameter.
async searchCompaniesBySymbol( params: CompanySymbolSearchParams, options?: { signal?: AbortSignal; context?: FMPContext; } ): Promise<CompanySearchResult[]> { return this.get<CompanySearchResult[]>( `/sec-filings-company-search/symbol`, { symbol: params.symbol, }, options ); } - src/api/sec-filings/types.ts:99-101 (schema)Type definition for the input parameters to searchCompaniesBySymbol, containing a single required `symbol` string field.
export interface CompanySymbolSearchParams { symbol: string; } - src/api/sec-filings/types.ts:14-22 (schema)Type definition for the return value of searchCompaniesBySymbol (CompanySearchResult[]). Contains company details like symbol, name, CIK, SIC code, industry, address, and phone.
export interface CompanySearchResult { symbol: string; name: string; cik: string; sicCode: string; industryTitle: string; businessAddress: string; phoneNumber: string; } - src/tools/sec-filings.ts:10-13 (registration)Registration function that sets up the SECFilingsClient and registers all SEC filings tools (including searchCompaniesBySymbol) on the MCP server.
export function registerSECFilingsTools( server: McpServer, accessToken?: string ): void {