Skip to main content
Glama

LinkedIn Enrichment

enrich_by_linkedin
Read-onlyIdempotent

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;
    }
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

The description adds valuable behavioral context beyond what annotations provide. While annotations declare readOnlyHint=true, destructiveHint=false, idempotentHint=true, and openWorldHint=true, the description specifies that it returns 'verified business data' and lists specific data types (email, job title, company details, phone numbers). This provides important context about the nature and quality of the returned data that isn't captured in annotations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is perfectly concise with just two sentences that each earn their place. The first sentence establishes the purpose and input, the second describes the output. No wasted words, well-structured, and front-loaded with the core functionality.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's moderate complexity, rich annotations, and 100% schema coverage, the description provides good contextual completeness. It explains what data is returned (though without an output schema, more detail on the return structure would be helpful). The main gap is the lack of explicit guidance on when to choose this tool versus the 'enrich_by_email' sibling.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

With 100% schema description coverage, the input schema already documents all three parameters thoroughly. The description mentions 'using a LinkedIn profile URL' which aligns with the 'linkedin' parameter, but doesn't add meaningful semantic context beyond what the schema provides. The baseline of 3 is appropriate when the schema does the heavy lifting.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the specific action ('Look up detailed person and company information'), resource ('using a LinkedIn profile URL'), and output scope ('Returns verified business data including email, job title, company details, and phone numbers'). It distinguishes itself from sibling tools like 'enrich_by_email' and 'validate_email' by specifying LinkedIn URL as the input source rather than email.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides clear context for when to use this tool ('using a LinkedIn profile URL'), but does not explicitly state when not to use it or mention alternatives like the sibling 'enrich_by_email' tool. The context is sufficient to understand the primary use case, but lacks explicit exclusion guidance.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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/leadfuze/mcp-server'

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