get_company_details
Retrieve comprehensive details about a company by providing its name or UUID, using Crunchbase MCP Server data for accurate insights.
Instructions
Get detailed information about a specific company
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name_or_id | Yes | Company name or UUID |
Implementation Reference
- src/index.ts:336-350 (handler)MCP tool call handler for 'get_company_details' that validates input, calls CrunchbaseAPI.getCompanyDetails, and returns JSON stringified company details.case 'get_company_details': { if (!args || typeof args !== 'object' || !('name_or_id' in args) || typeof args.name_or_id !== 'string') { throw new McpError(ErrorCode.InvalidParams, 'Missing or invalid name_or_id parameter'); } const params: GetCompanyDetailsInput = { name_or_id: args.name_or_id }; const company = await this.crunchbaseApi.getCompanyDetails(params); return { content: [ { type: 'text', text: JSON.stringify(company, null, 2), }, ], }; }
- src/crunchbase-api.ts:77-100 (handler)Core implementation of getCompanyDetails: searches for company by name_or_id to get UUID, then fetches detailed company data from Crunchbase API.async getCompanyDetails(params: GetCompanyDetailsInput): Promise<Company> { try { // First, try to search for the company by name const searchResponse = await this.client.get<CrunchbaseApiResponse<Company[]>>('/searches/organizations', { params: { query: params.name_or_id, limit: 1 } }); if (searchResponse.data.count === 0) { throw new Error(`Company not found: ${params.name_or_id}`); } const companyId = searchResponse.data.data[0].uuid; // Then, get the detailed information using the UUID const detailsResponse = await this.client.get<Company>(`/entities/organizations/${companyId}`); return detailsResponse.data; } catch (error) { console.error('Error getting company details:', error); throw this.handleError(error); } }
- src/index.ts:230-242 (registration)Tool registration in ListToolsRequestSchema handler, including name, description, and input schema.name: 'get_company_details', description: 'Get detailed information about a specific company', inputSchema: { type: 'object', properties: { name_or_id: { type: 'string', description: 'Company name or UUID', }, }, required: ['name_or_id'], }, },
- src/types.ts:125-127 (schema)TypeScript interface defining the input schema for get_company_details tool.export interface GetCompanyDetailsInput { name_or_id: string; }