add-comment-reaction
React to comments in Liveblocks by adding emojis for better collaboration and feedback. Specify room, thread, comment, and user details to engage effectively.
Instructions
Add a reaction to a Liveblocks comment
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| commentId | Yes | ||
| data | Yes | ||
| roomId | Yes | ||
| threadId | Yes |
Implementation Reference
- src/server.ts:546-553 (handler)The handler function that implements the 'add-comment-reaction' tool by calling the Liveblocks API to add a reaction to a specified comment.async ({ roomId, threadId, commentId, data }, extra) => { return await callLiveblocksApi( getLiveblocks().addCommentReaction( { roomId, threadId, commentId, data }, { signal: extra.signal } ) ); }
- src/server.ts:536-545 (schema)The input schema (parameters) for the 'add-comment-reaction' tool, defining roomId, threadId, commentId, and data with emoji, userId, and optional createdAt.{ roomId: z.string(), threadId: z.string(), commentId: z.string(), data: z.object({ emoji: z.string(), userId: z.string(), createdAt: z.date().optional(), }), },
- src/server.ts:533-554 (registration)The registration of the 'add-comment-reaction' tool on the MCP server, including name, description, schema, and handler.server.tool( "add-comment-reaction", `Add a reaction to a Liveblocks comment`, { roomId: z.string(), threadId: z.string(), commentId: z.string(), data: z.object({ emoji: z.string(), userId: z.string(), createdAt: z.date().optional(), }), }, async ({ roomId, threadId, commentId, data }, extra) => { return await callLiveblocksApi( getLiveblocks().addCommentReaction( { roomId, threadId, commentId, data }, { signal: extra.signal } ) ); } );