Skip to main content
Glama

get_linkedin_profile

Retrieve detailed LinkedIn profile data including work experience, education history, and professional skills by providing a user alias, URL, or URN.

Instructions

Get detailed information about a LinkedIn user profile

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
userYesUser alias, URL, or URN
with_educationNoInclude education info
with_experienceNoInclude experience info
with_skillsNoInclude skills info

Implementation Reference

  • Handler function that executes the get_linkedin_profile tool: constructs request data, calls the AnySite API endpoint for LinkedIn user profile, returns JSON response or error.
    async ({ user, with_experience, with_education, with_skills }) => {
      const requestData = { timeout: 300, user, with_experience, with_education, with_skills };
      log("Starting LinkedIn profile lookup for:", user);
      try {
        const response = await makeRequest(API_CONFIG.ENDPOINTS.USER_PROFILE, requestData);
        return {
          content: [
            {
              type: "text",
              text: JSON.stringify(response, null, 2)
            }
          ]
        };
      } catch (error) {
        log("LinkedIn profile lookup error:", error);
        return {
          content: [
            {
              type: "text",
              text: `LinkedIn API error: ${formatError(error)}`
            }
          ],
          isError: true
        };
      }
    }
  • Input schema using Zod for validating parameters: user (required string), optional booleans for including experience, education, skills.
      user: z.string().describe("User alias, URL, or URN"),
      with_experience: z.boolean().default(true).describe("Include experience info"),
      with_education: z.boolean().default(true).describe("Include education info"),
      with_skills: z.boolean().default(true).describe("Include skills info")
    },
  • src/index.ts:223-257 (registration)
    Registration of the get_linkedin_profile tool on the MCP server using server.tool(), including name, description, input schema, and handler function.
      "get_linkedin_profile",
      "Get detailed information about a LinkedIn user profile",
      {
        user: z.string().describe("User alias, URL, or URN"),
        with_experience: z.boolean().default(true).describe("Include experience info"),
        with_education: z.boolean().default(true).describe("Include education info"),
        with_skills: z.boolean().default(true).describe("Include skills info")
      },
      async ({ user, with_experience, with_education, with_skills }) => {
        const requestData = { timeout: 300, user, with_experience, with_education, with_skills };
        log("Starting LinkedIn profile lookup for:", user);
        try {
          const response = await makeRequest(API_CONFIG.ENDPOINTS.USER_PROFILE, requestData);
          return {
            content: [
              {
                type: "text",
                text: JSON.stringify(response, null, 2)
              }
            ]
          };
        } catch (error) {
          log("LinkedIn profile lookup error:", error);
          return {
            content: [
              {
                type: "text",
                text: `LinkedIn API error: ${formatError(error)}`
              }
            ],
            isError: true
          };
        }
      }
    );
  • API endpoint constant used by the handler: '/api/linkedin/user' for fetching LinkedIn user profiles.
    USER_PROFILE: "/api/linkedin/user",
  • TypeScript interface defining the input arguments for LinkedIn user profile, matching the Zod schema used in the tool.
    export interface LinkedinUserProfileArgs {
      user: string;
      with_experience?: boolean;
      with_education?: boolean;
      with_skills?: boolean;
    }
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. While 'Get' implies a read operation, the description doesn't address important aspects like authentication requirements, rate limits, data freshness, privacy considerations, or what happens when a profile isn't found. For a tool accessing external platform data with no annotation coverage, this is a significant gap.

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 a single, efficient sentence that gets straight to the point with no wasted words. It's appropriately sized for a tool with a clear primary function and doesn't bury important information in unnecessary verbiage.

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

Completeness3/5

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

For a read-only data retrieval tool with 100% schema coverage, the description is minimally adequate. However, the lack of annotations means important behavioral context is missing, and without an output schema, there's no information about what the detailed profile data actually looks like. The description should ideally mention the scope of 'detailed information' or reference the parameter-controlled sections.

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?

Schema description coverage is 100%, so the schema already documents all parameters thoroughly. The description doesn't add any parameter-specific information beyond what's in the schema - it mentions 'detailed information' but doesn't clarify what that includes or how parameters control it. With complete schema coverage, the baseline of 3 is appropriate.

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

Purpose4/5

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

The description clearly states the verb ('Get') and resource ('detailed information about a LinkedIn user profile'), making the purpose immediately understandable. However, it doesn't differentiate this tool from similar sibling tools like 'get_linkedin_user_connections' or 'get_linkedin_user_posts', which also retrieve LinkedIn user data but focus on specific aspects.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives. With many sibling tools that retrieve LinkedIn user data (e.g., get_linkedin_user_connections, get_linkedin_user_posts), there's no indication of when this comprehensive profile tool is preferred over more specific ones, nor any mention of prerequisites or limitations.

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

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