add_comment
Add comments or replies to tasks in FluentBoards project management, enabling team communication and task clarification through structured feedback.
Instructions
Add a comment to a task
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| board_id | Yes | Board ID | |
| task_id | Yes | Task ID | |
| comment | Yes | Comment text | |
| comment_type | No | Comment type - 'comment' for new comments, 'reply' for replies | comment |
| parent_id | No | Parent comment ID (required for replies) | |
| notify_users | No | User IDs to notify |
Implementation Reference
- src/tools/comments.ts:30-58 (handler)Handler that destructures arguments, builds comment data conditionally, and sends a POST request to the API to add the comment to the task.async (args) => { const { board_id, task_id, comment, comment_type, parent_id, notify_users, } = args; const commentData: any = { comment: comment, comment_type: comment_type, }; if (parent_id) { commentData.parent_id = parent_id; } if (notify_users && notify_users.length > 0) { commentData.notify_users = notify_users; } const response = await api.post( `/projects/${board_id}/tasks/${task_id}/comments`, commentData ); return formatResponse(response.data); }
- src/tools/comments.ts:12-29 (schema)Inline Zod schema defining the input parameters for the add_comment tool.{ board_id: z.number().int().positive().describe("Board ID"), task_id: z.number().int().positive().describe("Task ID"), comment: z.string().min(1).describe("Comment text"), comment_type: CommentTypeSchema.default("comment").describe( "Comment type - 'comment' for new comments, 'reply' for replies" ), parent_id: z .number() .int() .positive() .optional() .describe("Parent comment ID (required for replies)"), notify_users: z .array(z.number().int().positive()) .optional() .describe("User IDs to notify"), },
- src/tools/comments.ts:7-60 (registration)Function that registers the add_comment tool with the MCP server using server.tool().export function registerCommentTools(server: McpServer) { // Add a comment to a task server.tool( "add_comment", "Add a comment to a task", { board_id: z.number().int().positive().describe("Board ID"), task_id: z.number().int().positive().describe("Task ID"), comment: z.string().min(1).describe("Comment text"), comment_type: CommentTypeSchema.default("comment").describe( "Comment type - 'comment' for new comments, 'reply' for replies" ), parent_id: z .number() .int() .positive() .optional() .describe("Parent comment ID (required for replies)"), notify_users: z .array(z.number().int().positive()) .optional() .describe("User IDs to notify"), }, async (args) => { const { board_id, task_id, comment, comment_type, parent_id, notify_users, } = args; const commentData: any = { comment: comment, comment_type: comment_type, }; if (parent_id) { commentData.parent_id = parent_id; } if (notify_users && notify_users.length > 0) { commentData.notify_users = notify_users; } const response = await api.post( `/projects/${board_id}/tasks/${task_id}/comments`, commentData ); return formatResponse(response.data); } ); }
- src/index.ts:24-24 (registration)Top-level call to registerCommentTools during MCP server initialization, enabling the add_comment tool.registerCommentTools(server);
- src/types/index.ts:37-44 (schema)Zod schema for AddComment type, matching the tool's input schema (used for TypeScript types).export const AddCommentSchema = z.object({ board_id: z.number().int().positive(), task_id: z.number().int().positive(), comment: z.string().min(1), comment_type: CommentTypeSchema.default("comment"), parent_id: z.number().int().positive().optional(), notify_users: z.array(z.number().int().positive()).optional(), });