Skip to main content
Glama

react_to_post

Engage with LinkedIn posts by adding reactions like 'like', 'love', or 'support' directly through the Linked API MCP server. Specify the post URL and reaction type to interact efficiently.

Instructions

Allows you to react to a post using any available reaction type (st.reactToPost action).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
postUrlYesLinkedIn URL of the post to react. (e.g., 'https://www.linkedin.com/posts/username_activity-id')
typeYesEnum describing the reaction type.

Implementation Reference

  • The ReactToPostTool class implements the 'react_to_post' MCP tool. It extends OperationTool, defines the tool name, the LinkedIn API operation name (OPERATION_NAME.reactToPost), the input validation schema, and provides the tool specification via getTool() for MCP.
    export class ReactToPostTool extends OperationTool<TReactToPostParams, unknown> { public override readonly name = 'react_to_post'; public override readonly operationName = OPERATION_NAME.reactToPost; protected override readonly schema = z.object({ postUrl: z.string(), type: z.enum(['like', 'love', 'celebrate', 'support', 'funny', 'insightful']).or(z.string()), }); public override getTool(): Tool { return { name: this.name, description: 'Allows you to react to a post using any available reaction type (st.reactToPost action).', inputSchema: { type: 'object', properties: { postUrl: { type: 'string', description: "LinkedIn URL of the post to react. (e.g., 'https://www.linkedin.com/posts/username_activity-id')", }, type: { type: 'string', description: 'Enum describing the reaction type.', enum: ['like', 'love', 'support', 'celebrate', 'insightful', 'funny'], }, }, required: ['postUrl', 'type'], }, }; } }
  • Zod schema defining the input parameters for the react_to_post tool: postUrl (string) and type (enum or string). Used for validation in execute.
    protected override readonly schema = z.object({ postUrl: z.string(), type: z.enum(['like', 'love', 'celebrate', 'support', 'funny', 'insightful']).or(z.string()), });
  • Registers the ReactToPostTool instance in the LinkedApiTools class's tools array, making it available as part of the toolset.
    new ReactToPostTool(progressCallback),
  • The base execute method in OperationTool (inherited by ReactToPostTool) that locates the specific LinkedIn API operation by operationName and executes 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, }); }
  • Import statement for ReactToPostTool used in LinkedApiTools.
    import { ReactToPostTool } from './tools/react-to-post.js';

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