Skip to main content
Glama

enrich_by_linkedin

Extract verified business contact details from LinkedIn profiles to enrich lead data with emails, job titles, company information, and phone numbers.

Instructions

Look up detailed person and company information using a LinkedIn profile URL. Returns verified business data including email, job title, company details, and phone numbers.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
linkedinYesThe LinkedIn profile URL (e.g., linkedin.com/in/johndoe or https://www.linkedin.com/in/johndoe)
include_companyNoInclude company data in response
include_socialNoInclude social profile data in response

Implementation Reference

  • src/index.ts:109-172 (registration)
    MCP server registration of the 'enrich_by_linkedin' tool, including input schema, annotations, and execution handler that delegates to LeadFuzeClient
    server.registerTool( "enrich_by_linkedin", { title: "LinkedIn Enrichment", description: "Look up detailed person and company information using a LinkedIn profile URL. Returns verified business data including email, job title, company details, and phone numbers.", inputSchema: { linkedin: z .string() .describe( "The LinkedIn profile URL (e.g., linkedin.com/in/johndoe or https://www.linkedin.com/in/johndoe)" ), include_company: z .boolean() .default(true) .describe("Include company data in response"), include_social: z .boolean() .default(true) .describe("Include social profile data in response"), }, annotations: { title: "LinkedIn Enrichment", readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: true, }, }, async ({ linkedin, include_company, include_social }) => { try { const client = getClient(); const response = await client.enrichByLinkedIn({ linkedin, include_company, include_social, }); const formattedResponse = formatEnrichmentResponse(response); return { content: [ { type: "text" as const, text: formattedResponse, }, ], }; } catch (error) { const errorMessage = error instanceof Error ? error.message : "An unknown error occurred"; return { content: [ { type: "text" as const, text: `Error enriching LinkedIn profile: ${errorMessage}`, }, ], isError: true, }; } } );
  • Core handler function in LeadFuzeClient that normalizes the LinkedIn URL and makes the POST request to LeadFuze /enrichment/linkedin API endpoint
    async enrichByLinkedIn(params: LinkedInEnrichmentParams): Promise<EnrichmentResponse> { // Normalize LinkedIn URL - strip protocol and www const normalizedLinkedIn = normalizeLinkedInUrl(params.linkedin); return this.request<EnrichmentResponse>("/enrichment/linkedin", { linkedin_url: normalizedLinkedIn, include_company: params.include_company ?? true, include_social: params.include_social ?? true, limit: 100, page: 1, cache_ttl: 600, }); }
  • Zod input schema validation for the enrich_by_linkedin tool parameters
    inputSchema: { linkedin: z .string() .describe( "The LinkedIn profile URL (e.g., linkedin.com/in/johndoe or https://www.linkedin.com/in/johndoe)" ), include_company: z .boolean() .default(true) .describe("Include company data in response"), include_social: z .boolean() .default(true) .describe("Include social profile data in response"), },
  • TypeScript interface defining parameters for LinkedIn enrichment
    export interface LinkedInEnrichmentParams { linkedin: string; include_company?: boolean; include_social?: boolean; }
  • Helper function to normalize LinkedIn URLs by stripping protocol, www prefix, and trailing slash for API compatibility
    function normalizeLinkedInUrl(url: string): string { let normalized = url.trim(); // Remove protocol normalized = normalized.replace(/^https?:\/\//, ""); // Remove www. normalized = normalized.replace(/^www\./, ""); // Remove trailing slash normalized = normalized.replace(/\/$/, ""); return normalized; }

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/JeffJoyceChain/LeadFuze-MCP-Server'

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