Skip to main content
Glama

hatch_get_linkedin_url

Find LinkedIn profiles by entering a person's name, job title, and company. This tool helps locate professional contact information for networking or verification purposes.

Instructions

Find LinkedIn URL using name, designation, and company information.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameNoName of the person
designationNoJob title or designation of the person
companyNameYesCompany name

Implementation Reference

  • The main handler for the 'hatch_get_linkedin_url' tool. Validates input using the type guard, makes a POST request to the Hatch API '/v1/getLinkedinUrl' endpoint with retry logic, and returns the JSON response or formatted error.
    case 'hatch_get_linkedin_url': { if (!isGetLinkedInUrlParams(args)) { throw new McpError( ErrorCode.InvalidParams, 'Invalid arguments for hatch_get_linkedin_url' ); } try { const response = await withRetry( async () => apiClient.post('/v1/getLinkedinUrl', args), 'get linkedin url' ); 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, }; } }
  • Tool definition including name, description, and input schema for 'hatch_get_linkedin_url', specifying properties for name, designation (optional), and required companyName.
    const GET_LINKEDIN_URL_TOOL: Tool = { name: 'hatch_get_linkedin_url', description: 'Find LinkedIn URL using name, designation, and company information.', inputSchema: { type: 'object', properties: { name: { type: 'string', description: 'Name of the person', }, designation: { type: 'string', description: 'Job title or designation of the person', }, companyName: { type: 'string', description: 'Company name', }, }, required: ['companyName'], }, };
  • src/index.ts:314-319 (registration)
    Registration of the 'hatch_get_linkedin_url' tool (as GET_LINKEDIN_URL_TOOL) in the listTools response handler.
    FIND_EMAIL_TOOL, FIND_PHONE_TOOL, VERIFY_EMAIL_TOOL, FIND_COMPANY_DATA_TOOL, GET_LINKEDIN_URL_TOOL, ],
  • TypeScript interface defining the input parameters for the 'hatch_get_linkedin_url' tool.
    interface GetLinkedInUrlParams { name?: string; designation?: string; companyName: string; }
  • Type guard helper function to validate and type-check input arguments for the 'hatch_get_linkedin_url' handler.
    function isGetLinkedInUrlParams(args: unknown): args is GetLinkedInUrlParams { if ( typeof args !== 'object' || args === null || !('companyName' in args) || typeof (args as { companyName: unknown }).companyName !== 'string' ) { return false; } // Optional parameters if ( 'name' in args && (args as { name: unknown }).name !== undefined && typeof (args as { name: unknown }).name !== 'string' ) { return false; } if ( 'designation' in args && (args as { designation: unknown }).designation !== undefined && typeof (args as { designation: unknown }).designation !== 'string' ) { return false; } return true; }

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