linkedin_post_reactions
Analyze LinkedIn post engagement by retrieving reactions and interaction data from a specific URL to measure audience response.
Instructions
Retrieves reactions and engagement data for a specific LinkedIn post URL.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| post_url | Yes | The LinkedIn post URL to analyze for reactions. |
Implementation Reference
- The main handler function for the linkedin_post_reactions tool. It takes a post_url, calls the Clado API to fetch reactions, and returns the data as text content.
export const linkedinPostReactionsTool = async ({ post_url, }: LinkedinPostReactionsParams) => { const apiUrl = new URL("https://search.clado.ai/api/enrich/post-reactions"); apiUrl.searchParams.append("url", post_url); const response = await makeCladoRequest(apiUrl.toString(), {}); const responseData = await response.json(); if (responseData.error) { throw new Error( `Failed to get LinkedIn post reactions: ${JSON.stringify(responseData.error)}` ); } return { content: [ { type: "text" as const, text: `LinkedIn post reactions retrieved successfully: ${JSON.stringify(responseData, null, 2)}` } ] }; }; - Zod schema defining the input parameter post_url for the tool.
export const linkedinPostReactionsSchema = { post_url: z.string().describe("The LinkedIn post URL to analyze for reactions."), }; - src/index.ts:52-57 (registration)Registration of the linkedin_post_reactions tool with the MCP server in the main index file.
server.tool( linkedinPostReactionsName, linkedinPostReactionsDescription, linkedinPostReactionsSchema, linkedinPostReactionsTool ); - src/server_setup.ts:38-43 (registration)Registration of the linkedin_post_reactions tool in the server setup function.
server.tool( linkedinPostReactionsName, linkedinPostReactionsDescription, linkedinPostReactionsSchema, linkedinPostReactionsTool ); - TypeScript type definition for the tool parameters.
type LinkedinPostReactionsParams = { post_url: string; };