Skip to main content
Glama

hatch_find_phone

Extract phone numbers from LinkedIn profiles by providing the profile URL to locate contact information.

Instructions

Find a phone number using LinkedIn profile URL.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
linkedInUrlYesLinkedIn profile URL of the person

Implementation Reference

  • The main handler logic for the 'hatch_find_phone' tool, which validates input using isFindPhoneParams, calls the Hatch API endpoint '/v1/findPhone', and returns the response or error.
    case 'hatch_find_phone': { if (!isFindPhoneParams(args)) { throw new McpError( ErrorCode.InvalidParams, 'Invalid arguments for hatch_find_phone' ); } try { const response = await withRetry( async () => apiClient.post('/v1/findPhone', args), 'find phone' ); 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, }; } }
  • Defines the tool schema for 'hatch_find_phone', including name, description, and input schema.
    const FIND_PHONE_TOOL: Tool = { name: 'hatch_find_phone', description: 'Find a phone number using LinkedIn profile URL.', inputSchema: { type: 'object', properties: { linkedInUrl: { type: 'string', description: 'LinkedIn profile URL of the person', }, }, required: ['linkedInUrl'], }, };
  • src/index.ts:314-319 (registration)
    Registers the 'hatch_find_phone' tool (as FIND_PHONE_TOOL) in the list of available tools.
    FIND_EMAIL_TOOL, FIND_PHONE_TOOL, VERIFY_EMAIL_TOOL, FIND_COMPANY_DATA_TOOL, GET_LINKEDIN_URL_TOOL, ],
  • Type guard function to validate input parameters for the 'hatch_find_phone' tool.
    function isFindPhoneParams(args: unknown): args is FindPhoneParams { return ( typeof args === 'object' && args !== null && 'linkedInUrl' in args && typeof (args as { linkedInUrl: unknown }).linkedInUrl === 'string' ); }
  • TypeScript interface defining the expected input parameters for the 'hatch_find_phone' tool.
    interface FindPhoneParams { linkedInUrl: string; }

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Meerkats-Ai/hatch-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server