Skip to main content
Glama

fetch_person

Retrieve LinkedIn profile data, including basic info, experience, education, skills, languages, posts, comments, and reactions. Customize data retrieval by enabling specific parameters only when needed to optimize performance.

Instructions

Allows you to open a person page to retrieve their basic information and perform additional person-related actions if needed. (st.openPersonPage action). Allows additional optional retrieval of experience, education, skills, languages, posts, comments and reactions. āš ļø PERFORMANCE WARNING: Only set additional retrieval flags to true if you specifically need that data. Each additional parameter significantly increases execution time: šŸ’” Recommendation: Start with basic info only. Only request additional data if the user explicitly asks for it or if it's essential for the current task.

Input Schema

NameRequiredDescriptionDefault
commentRetrievalConfigNoOptional. Configuration for retrieving comments. Available only if retrieveComments is true.
personUrlYesThe LinkedIn profile URL of the person to fetch (e.g., 'https://www.linkedin.com/in/john-doe')
postsRetrievalConfigNoOptional. Configuration for retrieving posts. Available only if retrievePosts is true.
reactionRetrievalConfigNoOptional. Configuration for retrieving reactions. Available only if retrieveReactions is true.
retrieveCommentsNoOptional. Whether to retrieve the person's comments information. Default is false.
retrieveEducationNoOptional. Whether to retrieve the person's education information. Default is false.
retrieveExperienceNoOptional. Whether to retrieve the person's experience information. Default is false.
retrieveLanguagesNoOptional. Whether to retrieve the person's languages information. Default is false.
retrievePostsNoOptional. Whether to retrieve the person's posts information. Default is false.
retrieveReactionsNoOptional. Whether to retrieve the person's reactions information. Default is false.
retrieveSkillsNoOptional. Whether to retrieve the person's skills information. Default is false.

Input Schema (JSON Schema)

{ "properties": { "commentRetrievalConfig": { "description": "Optional. Configuration for retrieving comments. Available only if retrieveComments is true.", "properties": { "limit": { "description": "Optional. Number of comments to retrieve. Defaults to 20, with a maximum value of 20.", "type": "number" }, "since": { "description": "Optional. ISO 8601 timestamp to filter comments made after the specified time.", "type": "string" } }, "type": "object" }, "personUrl": { "description": "The LinkedIn profile URL of the person to fetch (e.g., 'https://www.linkedin.com/in/john-doe')", "type": "string" }, "postsRetrievalConfig": { "description": "Optional. Configuration for retrieving posts. Available only if retrievePosts is true.", "properties": { "limit": { "description": "Optional. Number of posts to retrieve. Defaults to 20, with a maximum value of 20.", "type": "number" }, "since": { "description": "Optional. ISO 8601 timestamp to filter posts published after the specified time.", "type": "string" } }, "type": "object" }, "reactionRetrievalConfig": { "description": "Optional. Configuration for retrieving reactions. Available only if retrieveReactions is true.", "properties": { "limit": { "description": "Optional. Number of reactions to retrieve. Defaults to 20, with a maximum value of 20.", "type": "number" }, "since": { "description": "Optional. ISO 8601 timestamp to filter reactions made after the specified time.", "type": "string" } }, "type": "object" }, "retrieveComments": { "description": "Optional. Whether to retrieve the person's comments information. Default is false.", "type": "boolean" }, "retrieveEducation": { "description": "Optional. Whether to retrieve the person's education information. Default is false.", "type": "boolean" }, "retrieveExperience": { "description": "Optional. Whether to retrieve the person's experience information. Default is false.", "type": "boolean" }, "retrieveLanguages": { "description": "Optional. Whether to retrieve the person's languages information. Default is false.", "type": "boolean" }, "retrievePosts": { "description": "Optional. Whether to retrieve the person's posts information. Default is false.", "type": "boolean" }, "retrieveReactions": { "description": "Optional. Whether to retrieve the person's reactions information. Default is false.", "type": "boolean" }, "retrieveSkills": { "description": "Optional. Whether to retrieve the person's skills information. Default is false.", "type": "boolean" } }, "required": [ "personUrl" ], "type": "object" }

Implementation Reference

  • FetchPersonTool class implementing the 'fetch_person' tool handler. Extends OperationTool, defines name, operationName (mapping to LinkedAPI fetchPerson), Zod input schema for validation, and MCP Tool definition via getTool() including detailed inputSchema and description.
    export class FetchPersonTool extends OperationTool<TFetchPersonParams, unknown> { public override readonly name = 'fetch_person'; public override readonly operationName = OPERATION_NAME.fetchPerson; protected override readonly schema = z.object({ personUrl: z.string(), retrieveExperience: z.boolean().optional().default(false), retrieveEducation: z.boolean().optional().default(false), retrieveSkills: z.boolean().optional().default(false), retrieveLanguages: z.boolean().optional().default(false), retrievePosts: z.boolean().optional().default(false), retrieveComments: z.boolean().optional().default(false), retrieveReactions: z.boolean().optional().default(false), postsRetrievalConfig: z .object({ limit: z.number().min(1).max(20).optional(), since: z.string().optional(), }) .optional(), commentRetrievalConfig: z .object({ limit: z.number().min(1).max(20).optional(), since: z.string().optional(), }) .optional(), reactionRetrievalConfig: z .object({ limit: z.number().min(1).max(20).optional(), since: z.string().optional(), }) .optional(), }); public override getTool(): Tool { return { name: this.name, description: `Allows you to open a person page to retrieve their basic information and perform additional person-related actions if needed. (st.openPersonPage action). Allows additional optional retrieval of experience, education, skills, languages, posts, comments and reactions. āš ļø **PERFORMANCE WARNING**: Only set additional retrieval flags to true if you specifically need that data. Each additional parameter significantly increases execution time: šŸ’” **Recommendation**: Start with basic info only. Only request additional data if the user explicitly asks for it or if it's essential for the current task. `, inputSchema: { type: 'object', properties: { personUrl: { type: 'string', description: "The LinkedIn profile URL of the person to fetch (e.g., 'https://www.linkedin.com/in/john-doe')", }, retrieveExperience: { type: 'boolean', description: "Optional. Whether to retrieve the person's experience information. Default is false.", }, retrieveEducation: { type: 'boolean', description: "Optional. Whether to retrieve the person's education information. Default is false.", }, retrieveSkills: { type: 'boolean', description: "Optional. Whether to retrieve the person's skills information. Default is false.", }, retrieveLanguages: { type: 'boolean', description: "Optional. Whether to retrieve the person's languages information. Default is false.", }, retrievePosts: { type: 'boolean', description: "Optional. Whether to retrieve the person's posts information. Default is false.", }, retrieveComments: { type: 'boolean', description: "Optional. Whether to retrieve the person's comments information. Default is false.", }, retrieveReactions: { type: 'boolean', description: "Optional. Whether to retrieve the person's reactions information. Default is false.", }, postsRetrievalConfig: { type: 'object', description: 'Optional. Configuration for retrieving posts. Available only if retrievePosts is true.', properties: { limit: { type: 'number', description: 'Optional. Number of posts to retrieve. Defaults to 20, with a maximum value of 20.', }, since: { type: 'string', description: 'Optional. ISO 8601 timestamp to filter posts published after the specified time.', }, }, }, commentRetrievalConfig: { type: 'object', description: 'Optional. Configuration for retrieving comments. Available only if retrieveComments is true.', properties: { limit: { type: 'number', description: 'Optional. Number of comments to retrieve. Defaults to 20, with a maximum value of 20.', }, since: { type: 'string', description: 'Optional. ISO 8601 timestamp to filter comments made after the specified time.', }, }, }, reactionRetrievalConfig: { type: 'object', description: 'Optional. Configuration for retrieving reactions. Available only if retrieveReactions is true.', properties: { limit: { type: 'number', description: 'Optional. Number of reactions to retrieve. Defaults to 20, with a maximum value of 20.', }, since: { type: 'string', description: 'Optional. ISO 8601 timestamp to filter reactions made after the specified time.', }, }, }, }, required: ['personUrl'], }, }; } }
  • Registration of the fetch_person tool by instantiating FetchPersonTool in the LinkedApiTools constructor's tools array.
    new FetchPersonTool(progressCallback),
  • Base execute handler in OperationTool that performs the tool execution for fetch_person by locating the corresponding LinkedAPI operation via operationName and invoking it with progress tracking.
    public override execute({ linkedapi, args, workflowTimeout, progressToken, }: { linkedapi: LinkedApi; args: TParams; workflowTimeout: number; progressToken?: string | number; }): Promise<TMappedResponse<TResult>> { const operation = linkedapi.operations.find( (operation) => operation.operationName === this.operationName, )! as Operation<TParams, TResult>; return executeWithProgress(this.progressCallback, operation, workflowTimeout, { params: args, progressToken, }); }
  • MCP server registration: getTools() method that provides the Tool objects (including fetch_person) to the MCP protocol.
    public getTools(): Tool[] { return this.tools.tools.map((tool) => tool.getTool()); }
  • MCP server call handler that locates the tool by name ('fetch_person'), validates inputs, and invokes the tool's execute method with LinkedAPI client.
    const tool = this.tools.toolByName(toolName)!; const params = tool.validate(args); const { data, errors } = await tool.execute({ linkedapi, args: params, workflowTimeout, progressToken, });

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/Linked-API/linkedapi-mcp'

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