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
| Name | Required | Description | Default |
|---|---|---|---|
| postUrl | Yes | LinkedIn URL of the post to react. (e.g., 'https://www.linkedin.com/posts/username_activity-id') | |
| type | Yes | Enum describing the reaction type. |
Implementation Reference
- src/tools/react-to-post.ts:7-38 (handler)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'], }, }; } }
- src/tools/react-to-post.ts:10-13 (schema)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()), });
- src/linked-api-tools.ts:49-49 (registration)Registers the ReactToPostTool instance in the LinkedApiTools class's tools array, making it available as part of the toolset.new ReactToPostTool(progressCallback),
- src/utils/linked-api-tool.ts:39-57 (handler)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, }); }
- src/linked-api-tools.ts:16-16 (registration)Import statement for ReactToPostTool used in LinkedApiTools.import { ReactToPostTool } from './tools/react-to-post.js';