update-task-comment
Modify the content or attachments of an existing comment on a Dooray task to update information or add files.
Instructions
Update an existing comment (댓글) on a Dooray task.
This tool modifies the content or attachments of an existing task comment.
IMPORTANT LIMITATION: Comments created from incoming emails CANNOT be modified. Only regular comments can be updated.
URL Pattern Recognition: When given a Dooray task URL like "https://nhnent.dooray.com/task/PROJECT_ID/TASK_ID" or "https://nhnent.dooray.com/project/tasks/TASK_ID":
Extract the first numeric ID after "/task/" as projectId (if present)
Extract the second numeric ID (or the ID after "/tasks/") as taskId
Use get-task-comment-list to find the comment ID you want to update
REQUIRED: projectId, taskId, and commentId are all required.
Optional Parameters: You can provide either body, attachFileIds, or both. If you only want to update the text, just provide body. If you only want to update attachments, just provide attachFileIds.
File Attachments:
To attach files, first upload them using the file upload API
Then provide the returned file IDs in the attachFileIds parameter
See: https://helpdesk.dooray.com/share/pages/9wWo-xwiR66BO5LGshgVTg/2939987647631384419
Workflow:
Use get-task-comment-list to find the comment you want to update and get its ID
Call update-task-comment with the comment ID and new content/attachments
The comment will be modified immediately
Content Format:
Use "text/x-markdown" for markdown formatting (recommended)
Use "text/html" for rich HTML content
Body format: {"mimeType": "text/x-markdown", "content": "..."}
Examples:
Update comment text only: { "projectId": "123456", "taskId": "789012", "commentId": "4219415732999317024", "body": { "mimeType": "text/x-markdown", "content": "## Updated Comment\n\nThis comment has been revised" } }
Update with new attachments: { "projectId": "123456", "taskId": "789012", "commentId": "4219415732999317024", "body": { "mimeType": "text/x-markdown", "content": "See updated files" }, "attachFileIds": ["file123", "file456"] }
Returns: Success message upon completion.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| projectId | Yes | Project ID where the task belongs | |
| taskId | Yes | Task ID where the comment exists | |
| commentId | Yes | Comment ID to update | |
| body | No | New comment content | |
| attachFileIds | No | Array of file IDs to attach (optional) |
Implementation Reference
- The main handler function that executes the tool logic by calling the projects API to update the task comment and returns a success message or formatted error.export async function updateTaskCommentHandler(args: UpdateTaskCommentInput) { try { await projectsApi.updateTaskComment({ projectId: args.projectId, taskId: args.taskId, commentId: args.commentId, body: args.body, attachFileIds: args.attachFileIds, }); return { content: [ { type: 'text', text: `Successfully updated comment ${args.commentId}` } ], }; } catch (error) { return formatError(error); } }
- Zod schema definitions for input validation, including nested bodySchema and the main updateTaskCommentSchema used for tool parameter validation.const bodySchema = z.object({ content: z.string().describe('Comment content'), mimeType: z.enum(['text/x-markdown', 'text/html']).describe('Content format (use text/x-markdown for most cases)'), }); export const updateTaskCommentSchema = z.object({ projectId: z.string().describe('Project ID where the task belongs'), taskId: z.string().describe('Task ID where the comment exists'), commentId: z.string().describe('Comment ID to update'), body: bodySchema.optional().describe('New comment content'), attachFileIds: z.array(z.string()).optional().describe('Array of file IDs to attach (optional)'), });
- src/index.ts:56-56 (registration)Registers the updateTaskCommentHandler and updateTaskCommentSchema in the central toolRegistry map, which is used by the MCP server to dispatch tool calls.'update-task-comment': { handler: updateTaskCommentHandler, schema: updateTaskCommentSchema },
- src/index.ts:79-79 (registration)Includes the updateTaskCommentTool definition in the tools array, which is returned in response to list_tools requests.updateTaskCommentTool,
- Tool metadata object containing name, detailed description, and JSON inputSchema for the update-task-comment tool, used in list_tools responses.export const updateTaskCommentTool = { name: 'update-task-comment', description: `Update an existing comment (댓글) on a Dooray task. This tool modifies the content or attachments of an existing task comment. **IMPORTANT LIMITATION**: Comments created from incoming emails CANNOT be modified. Only regular comments can be updated. **URL Pattern Recognition**: When given a Dooray task URL like "https://nhnent.dooray.com/task/PROJECT_ID/TASK_ID" or "https://nhnent.dooray.com/project/tasks/TASK_ID": - Extract the first numeric ID after "/task/" as projectId (if present) - Extract the second numeric ID (or the ID after "/tasks/") as taskId - Use get-task-comment-list to find the comment ID you want to update **REQUIRED**: projectId, taskId, and commentId are all required. **Optional Parameters**: You can provide either body, attachFileIds, or both. If you only want to update the text, just provide body. If you only want to update attachments, just provide attachFileIds. **File Attachments**: - To attach files, first upload them using the file upload API - Then provide the returned file IDs in the attachFileIds parameter - See: https://helpdesk.dooray.com/share/pages/9wWo-xwiR66BO5LGshgVTg/2939987647631384419 **Workflow**: 1. Use get-task-comment-list to find the comment you want to update and get its ID 2. Call update-task-comment with the comment ID and new content/attachments 3. The comment will be modified immediately **Content Format**: - Use "text/x-markdown" for markdown formatting (recommended) - Use "text/html" for rich HTML content - Body format: {"mimeType": "text/x-markdown", "content": "..."} **Examples**: - Update comment text only: { "projectId": "123456", "taskId": "789012", "commentId": "4219415732999317024", "body": { "mimeType": "text/x-markdown", "content": "## Updated Comment\\n\\nThis comment has been revised" } } - Update with new attachments: { "projectId": "123456", "taskId": "789012", "commentId": "4219415732999317024", "body": { "mimeType": "text/x-markdown", "content": "See updated files" }, "attachFileIds": ["file123", "file456"] } Returns: Success message upon completion.`, inputSchema: { type: 'object', properties: { projectId: { type: 'string', description: 'Project ID where the task belongs', }, taskId: { type: 'string', description: 'Task ID where the comment exists', }, commentId: { type: 'string', description: 'Comment ID to update', }, body: { type: 'object', properties: { content: { type: 'string', description: 'Comment content', }, mimeType: { type: 'string', enum: ['text/x-markdown', 'text/html'], description: 'Content format (use text/x-markdown for most cases)', }, }, required: ['content', 'mimeType'], description: 'New comment content', }, attachFileIds: { type: 'array', items: { type: 'string', }, description: 'Array of file IDs to attach (optional)', }, }, required: ['projectId', 'taskId', 'commentId'], }, };