Skip to main content
Glama
felipfr

LinkedIn MCP Server

by felipfr

get_profile

Retrieve detailed LinkedIn profile data using profile ID to gain insights, network analytics, and user information for strategic decision-making.

Instructions

Access detailed LinkedIn profile information for any user

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
profileIdYesLinkedIn profile ID

Implementation Reference

  • Core handler function that fetches LinkedIn profile by publicId or urnId using authenticated API request
    public async getProfile(params: GetProfileParams): Promise<LinkedInProfile> {
      if (!params.publicId && !params.urnId) {
        throw new Error('Either publicId or urnId must be provided')
      }
    
      const idTypeMapping: Record<string, () => string> = {
        publicId: () => `/people/${params.publicId}`,
        urnId: () => `/people/${encodeURIComponent(params.urnId as string)}`
      }
    
      const idType = Object.keys(idTypeMapping).find((key) => params[key as keyof GetProfileParams])
      if (!idType) {
        throw new Error('No valid ID provided')
      }
    
      const endpoint =
        idTypeMapping[idType]() +
        '?projection=(id,firstName,lastName,profilePicture,headline,summary,industry,location,positions,educations,skills)'
    
      return this.makeRequest<LinkedInProfile>('get', endpoint)
    }
  • src/server.ts:85-102 (registration)
    MCP tool registration for 'get-profile', including inline handler that delegates to clientService
    this.server.tool(
      'get-profile',
      'Retrieve detailed LinkedIn profile information',
      linkedinApiSchemas.getProfile,
      async (params) => {
        this.logger.info('Retrieving LinkedIn Profile', {
          publicId: params.publicId,
          urnId: params.urnId
        })
        try {
          const profile = await this.clientService.getProfile(params)
          return this.createResourceResponse(profile)
        } catch (error) {
          this.logger.error('LinkedIn Profile Retrieval Failed', error)
          throw error
        }
      }
    )
  • Zod input schema for getProfile tool parameters
    getProfile: {
      publicId: z.string().optional().describe('Public ID of the LinkedIn profile'),
      urnId: z.string().optional().describe('URN ID of the LinkedIn profile')
    },
  • TypeScript interface defining input parameters for getProfile
    export interface GetProfileParams {
      publicId?: string
      urnId?: string
    }
Behavior2/5

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

No annotations are provided, so the description carries full burden. It states the tool accesses profile information but doesn't disclose behavioral traits like whether it requires authentication, rate limits, privacy restrictions, or what format the information returns. The description is minimal and lacks critical operational context.

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 front-loads the core purpose without unnecessary words. Every part of the sentence contributes to understanding what the tool does.

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

Completeness2/5

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

Given the complexity of accessing external social media data, no annotations, and no output schema, the description is incomplete. It doesn't address authentication needs, data format, error conditions, or limitations (e.g., privacy settings), leaving significant gaps for an AI agent to use it effectively.

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% (the single parameter 'profileId' is documented as 'LinkedIn profile ID'), so the baseline is 3. The description adds no additional meaning about the parameter beyond what the schema provides, such as where to find profile IDs or format examples.

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 tool's purpose with a specific verb ('Access') and resource ('detailed LinkedIn profile information for any user'). It distinguishes from siblings like get_my_profile (which presumably accesses the authenticated user's own profile) by specifying 'any user', though it doesn't explicitly name alternatives.

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 like get_my_profile or search_people. It mentions 'any user' which implies it's for looking up other users' profiles, but doesn't specify prerequisites (e.g., authentication status) or exclusions.

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

Related 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/felipfr/linkedin-mcpserver'

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