react_to_post
Add reactions to LinkedIn posts using available types like like, love, support, celebrate, insightful, or funny to engage with content.
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)ReactToPostTool class: defines the tool name 'react_to_post', LinkedIn operation name, Zod validation schema, and MCP Tool object with inputSchema. Inherits execution logic from OperationTool.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/utils/linked-api-tool.ts:39-57 (handler)Execute method in OperationTool (base class for ReactToPostTool): finds the LinkedAPI operation matching 'reactToPost' and executes it with input args and progress reporting.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/tools/react-to-post.ts:10-13 (schema)Zod schema for validating react_to_post input parameters: postUrl (string) and type (reaction enum or string).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:50-50 (registration)Instantiation of ReactToPostTool within the LinkedApiTools constructor's tools array, registering it for use in the MCP server.new ReactToPostTool(progressCallback),
- src/linked-api-server.ts:19-19 (registration)Initialization of LinkedApiTools in LinkedApiServer, which includes the react_to_post tool among others, for provision to the MCP server.this.tools = new LinkedApiTools(progressCallback);