Skip to main content
Glama

add_comment

Add comments or replies to tasks on FluentBoards project boards to facilitate team communication and task clarification.

Instructions

Add a comment to a task

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
board_idYesBoard ID
task_idYesTask ID
commentYesComment text
comment_typeNoComment type - 'comment' for new comments, 'reply' for repliescomment
parent_idNoParent comment ID (required for replies)
notify_usersNoUser IDs to notify

Implementation Reference

  • Handler function that constructs the comment data from input arguments, conditionally adds parent_id and notify_users, makes a POST request to the API to add the comment to the specified task, and returns the formatted response.
    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); }
  • Registers the 'add_comment' tool on the MCP server, including description, input schema using Zod, and the handler function.
    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); } ); }
  • Zod schema defining the input structure for adding a comment, matching the tool's parameters exactly.
    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(), });
  • src/index.ts:24-24 (registration)
    Top-level registration call that invokes registerCommentTools to add the add_comment tool to the MCP server.
    registerCommentTools(server);
  • Helper schema for comment_type used within the add_comment tool's input schema.
    export const CommentTypeSchema = z.enum(["comment", "reply"]);

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/danieliser/fluent-boards-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server