Skip to main content
Glama

hatch_get_linkedin_url

Find LinkedIn profiles by providing a person's name, job title, and company information to locate professional contact details.

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

  • Handler logic for 'hatch_get_linkedin_url' tool: validates parameters using type guard, makes POST request to '/v1/getLinkedinUrl' API endpoint with retry logic, and returns 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 schema definition for 'hatch_get_linkedin_url' including name, description, and input schema with properties for name, designation, 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-320 (registration)
    Registration of the 'hatch_get_linkedin_url' tool (as GET_LINKEDIN_URL_TOOL) in the listTools response.
    FIND_EMAIL_TOOL, FIND_PHONE_TOOL, VERIFY_EMAIL_TOOL, FIND_COMPANY_DATA_TOOL, GET_LINKEDIN_URL_TOOL, ], }));
  • Type guard helper function 'isGetLinkedInUrlParams' used to validate input arguments for the tool 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; }
  • TypeScript interface defining the input parameters for 'hatch_get_linkedin_url' tool.
    interface GetLinkedInUrlParams { name?: string; designation?: string; companyName: 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