hatch_find_company_data
Retrieve detailed company information by entering a domain name. This tool provides contact details, LinkedIn profiles, and verification data for business research.
Instructions
Find detailed information about a company using its domain.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| domain | Yes | Company domain name |
Implementation Reference
- src/index.ts:443-476 (handler)The main handler function for the 'hatch_find_company_data' tool. It validates the input arguments using the type guard, makes a POST request to the Hatch API endpoint '/v1/findCompanyData' with retry logic, and returns the response or error.case 'hatch_find_company_data': { if (!isFindCompanyDataParams(args)) { throw new McpError( ErrorCode.InvalidParams, 'Invalid arguments for hatch_find_company_data' ); } try { const response = await withRetry( async () => apiClient.post('/v1/findCompanyData', args), 'find company data' ); return { content: [ { type: 'text', text: JSON.stringify(response.data, null, 2), }, ], isError: false, }; } catch (error) { const errorMessage = axios.isAxiosError(error) ? `API Error: ${error.response?.data?.message || error.message}` : `Error: ${error instanceof Error ? error.message : String(error)}`; return { content: [{ type: 'text', text: errorMessage }], isError: true, }; } }
- src/index.ts:71-84 (schema)Tool schema definition for 'hatch_find_company_data', including name, description, and input schema requiring a 'domain' string.const FIND_COMPANY_DATA_TOOL: Tool = { name: 'hatch_find_company_data', description: 'Find detailed information about a company using its domain.', inputSchema: { type: 'object', properties: { domain: { type: 'string', description: 'Company domain name', }, }, required: ['domain'], }, };
- src/index.ts:312-320 (registration)Registration of the tool list handler, which includes 'hatch_find_company_data' (via FIND_COMPANY_DATA_TOOL) among the available tools.server.setRequestHandler(ListToolsRequestSchema, async () => ({ tools: [ FIND_EMAIL_TOOL, FIND_PHONE_TOOL, VERIFY_EMAIL_TOOL, FIND_COMPANY_DATA_TOOL, GET_LINKEDIN_URL_TOOL, ], }));
- src/index.ts:124-126 (schema)TypeScript interface defining the input parameters for the tool (domain: string).interface FindCompanyDataParams { domain: string; }
- src/index.ts:166-173 (helper)Type guard function to validate input arguments match FindCompanyDataParams before executing the handler.function isFindCompanyDataParams(args: unknown): args is FindCompanyDataParams { return ( typeof args === 'object' && args !== null && 'domain' in args && typeof (args as { domain: unknown }).domain === 'string' ); }