Skip to main content
Glama
automcp-app

Linkd MCP Server

by automcp-app

retrieve_contacts

Extract email addresses and phone numbers from LinkedIn profiles using profile URLs to obtain contact information for professional networking.

Instructions

Retrieves email addresses and phone numbers for a LinkedIn profile. Each lookup costs 1 credit.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
linkedin_urlYesThe LinkedIn profile URL to look up.

Implementation Reference

  • The handler function that executes the retrieve_contacts tool. It takes a LinkedIn URL, makes an API request to fetch contact information, handles errors, and returns the response.
    export const retrieveContactsTool = async ({
      linkedin_url,
    }: RetrieveContactsParams) => {
      const apiUrl = new URL("https://search.linkd.inc/api/enrich/contacts");
      apiUrl.searchParams.append("linkedin_url", linkedin_url);
    
      const response = await makeLinkdRequest(apiUrl.toString(), {});
      const responseData = await response.json();
    
      if (responseData.error) {
        throw new Error(
          `Failed to retrieve contact information: ${JSON.stringify(responseData.error)}`
        );
      }
    
      return {
        content: [
          {
            type: "text" as const,
            text: `contact information retrieved successfully: ${JSON.stringify(responseData, null, 2)}`
          }
        ]
      };
    };
  • Tool name, description, input schema (Zod validator), and TypeScript type for parameters.
    export const retrieveContactsName = "retrieve_contacts";
    
    export const retrieveContactsDescription = "Retrieves email addresses and phone numbers for a LinkedIn profile. Each lookup costs 1 credit.";
    
    export const retrieveContactsSchema = {
      linkedin_url: z.string().describe("The LinkedIn profile URL to look up."),
    };
    
    type RetrieveContactsParams = {
      linkedin_url: string;
    };
  • Registration of the retrieve_contacts tool with the MCP server using the name, description, schema, and handler.
    server.tool(
      retrieveContactsName,
      retrieveContactsDescription,
      retrieveContactsSchema,
      retrieveContactsTool
    );
Behavior4/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It effectively communicates key operational constraints: the tool performs data retrieval (not creation/modification), has a cost implication (1 credit per lookup), and targets LinkedIn profiles. However, it doesn't mention rate limits, authentication requirements, data freshness, or what happens with invalid URLs.

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 two sentences that each earn their place: the first states the core functionality, the second adds crucial cost information. It's front-loaded with the primary purpose and wastes no words on redundant information.

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?

For a single-parameter retrieval tool with no annotations and no output schema, the description provides good coverage of what the tool does and its cost implications. However, it doesn't describe the return format (structure of email/phone data) or potential error conditions, which would be helpful given the absence of an output schema.

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?

The input schema has 100% description coverage, with the single parameter 'linkedin_url' clearly documented. The description doesn't add any parameter-specific information beyond what the schema already provides (it doesn't elaborate on URL format requirements or validation rules). The baseline score 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 ('retrieves') and resources ('email addresses and phone numbers') with the target ('LinkedIn profile'). It distinguishes itself from sibling tools like 'enrich_linkedin' or 'scrape_linkedin' by focusing specifically on contact information retrieval rather than broader enrichment or scraping operations.

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 about when to use this tool ('for a LinkedIn profile') and mentions the cost implication ('Each lookup costs 1 credit'), which helps guide usage decisions. However, it doesn't explicitly state when NOT to use it or name specific alternatives among the sibling tools for different scenarios.

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/automcp-app/linkd-mcp'

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