Skip to main content
Glama
Jing-yilin

LinkedIn MCP Server

by Jing-yilin

get_post_reactions

Retrieve and analyze reactions on LinkedIn posts to understand engagement patterns and audience response.

Instructions

Get reactions on a LinkedIn post. Returns cleaned data in TOON format.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
postYesLinkedIn post URL (required)
pageNoPage number
save_dirNoDirectory to save cleaned JSON data
max_itemsNoMaximum reactions (default: 10)

Implementation Reference

  • The handler function that executes the tool logic: fetches reactions for a LinkedIn post via API, cleans and limits the results, formats the response in TOON format.
    private async getPostReactions(args: Record<string, any>): Promise<CallToolResult> { const params: Record<string, any> = { post: args.post }; if (args.page) params.page = args.page; const data = await this.makeRequest('/post-reactions', params); const maxItems = args.max_items || 10; const cleaned = (data.elements || []).slice(0, maxItems).map(DataCleaners.cleanReaction); return this.formatResponse(cleaned, { saveDir: args.save_dir, toolName: 'get_post_reactions', pagination: data.pagination, }); }
  • The input schema defining parameters: post (required), page, save_dir, max_items.
    inputSchema: { type: 'object', properties: { post: { type: 'string', description: 'LinkedIn post URL (required)' }, page: { type: 'integer', description: 'Page number', default: 1 }, save_dir: { type: 'string', description: 'Directory to save cleaned JSON data' }, max_items: { type: 'integer', description: 'Maximum reactions (default: 10)', default: 10 }, }, required: ['post'], },
  • src/index.ts:471-483 (registration)
    Registration of the 'get_post_reactions' tool in the MCP server's tools array.
    name: 'get_post_reactions', description: 'Get reactions on a LinkedIn post. Returns cleaned data in TOON format.', inputSchema: { type: 'object', properties: { post: { type: 'string', description: 'LinkedIn post URL (required)' }, page: { type: 'integer', description: 'Page number', default: 1 }, save_dir: { type: 'string', description: 'Directory to save cleaned JSON data' }, max_items: { type: 'integer', description: 'Maximum reactions (default: 10)', default: 10 }, }, required: ['post'], }, } as Tool,
  • src/index.ts:547-547 (registration)
    Dispatch case in the CallToolRequestHandler that routes to the getPostReactions handler.
    case 'get_post_reactions': return await this.getPostReactions(args as Record<string, any>);

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/Jing-yilin/linkedin-mcp-server'

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