company_research_exa
Analyze companies in-depth to uncover operations, financial data, industry trends, and news. Utilize AI-powered search to retrieve structured insights for informed decision-making.
Instructions
Research companies using Exa AI - finds comprehensive information about businesses, organizations, and corporations. Provides insights into company operations, news, financial information, and industry analysis.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| companyName | Yes | Name of the company to research | |
| numResults | No | Number of search results to return (default: 5) |
Input Schema (JSON Schema)
{
"$schema": "http://json-schema.org/draft-07/schema#",
"additionalProperties": false,
"properties": {
"companyName": {
"description": "Name of the company to research",
"type": "string"
},
"numResults": {
"description": "Number of search results to return (default: 5)",
"type": "number"
}
},
"required": [
"companyName"
],
"type": "object"
}
Implementation Reference
- src/tools/index.ts:217-226 (handler)MCP tool handler for company_research_exa: parses input, calls ExaClient.researchCompany, formats and returns results.case 'company_research_exa': { const params = companyResearchSchema.parse(args); const results = await client.researchCompany(params); return { content: [{ type: "text", text: formatCompanyResults(results) }] }; }
- src/tools/index.ts:36-43 (schema)Zod schema for validating company_research_exa tool input parameters.const companyResearchSchema = z.object({ company_name: z.string().describe("Name of the company to research"), include_news: z.boolean().optional().default(true).describe("Include recent news and announcements"), include_overview: z.boolean().optional().default(true).describe("Include company overview and description"), include_competitors: z.boolean().optional().default(false).describe("Include information about competitors"), include_reviews: z.boolean().optional().default(false).describe("Include customer reviews and feedback"), max_results_per_category: z.number().optional().default(5).describe("Maximum results per category (default: 5)") });
- src/tools/index.ts:156-194 (registration)Tool definition registration in getToolDefinitions, including name, description, and inputSchema.{ name: 'company_research_exa', description: 'Research companies and organizations comprehensively', inputSchema: { type: "object", properties: { company_name: { type: "string", description: "Name of the company to research" }, include_news: { type: "boolean", description: "Include recent news and announcements", default: true }, include_overview: { type: "boolean", description: "Include company overview and description", default: true }, include_competitors: { type: "boolean", description: "Include information about competitors", default: false }, include_reviews: { type: "boolean", description: "Include customer reviews and feedback", default: false }, max_results_per_category: { type: "number", description: "Maximum results per category (default: 5)", default: 5 } }, required: ["company_name"] } }
- src/client.ts:77-141 (helper)Core implementation logic in ExaClient: executes multiple Exa searches for company aspects and returns aggregated results.async researchCompany(params: { company_name: string; include_news?: boolean; include_overview?: boolean; include_competitors?: boolean; include_reviews?: boolean; max_results_per_category?: number; }) { try { const results: any = {}; const maxResults = params.max_results_per_category || 5; if (params.include_overview !== false) { const overviewSearch = await this.search({ query: `"${params.company_name}" company overview about products services`, num_results: maxResults, type: 'neural', include_text: true, include_summary: true }); results.overview = overviewSearch; } if (params.include_news) { const newsSearch = await this.search({ query: `"${params.company_name}" latest news announcements`, num_results: maxResults, type: 'neural', start_published_date: new Date(Date.now() - 90 * 24 * 60 * 60 * 1000).toISOString().split('T')[0], include_text: true, include_highlights: true }); results.news = newsSearch; } if (params.include_competitors) { const competitorSearch = await this.search({ query: `"${params.company_name}" competitors "competing with" OR "competes with" OR "alternative to"`, num_results: maxResults, type: 'neural', include_text: true, include_highlights: true }); results.competitors = competitorSearch; } if (params.include_reviews) { const reviewSearch = await this.search({ query: `"${params.company_name}" reviews customer feedback testimonials ratings`, num_results: maxResults, type: 'neural', include_text: true, include_highlights: true }); results.reviews = reviewSearch; } return results; } catch (error) { throw new ExaError( error instanceof Error ? error.message : 'Failed to research company', 'RESEARCH_ERROR' ); } }
- src/formatters.ts:53-73 (helper)Formats the company research results into markdown sections for output.export function formatCompanyResults(results: any): string { const sections = []; if (results.overview) { sections.push('## Company Overview\n' + formatSearchResults(results.overview)); } if (results.news) { sections.push('## Recent News\n' + formatSearchResults(results.news)); } if (results.competitors) { sections.push('## Competitors\n' + formatSearchResults(results.competitors)); } if (results.reviews) { sections.push('## Reviews & Feedback\n' + formatSearchResults(results.reviews)); } return sections.join('\n\n---\n\n'); }