update_comment
Modify an existing ClickUp comment by updating its text, reassigning it, or marking it as resolved.
Instructions
Update an existing ClickUp comment's properties including text, assignee, and resolved status.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| comment_id | Yes | The ID of the comment to update | |
| comment_text | Yes | The new text content of the comment | |
| assignee | No | The ID of the user to assign to the comment | |
| resolved | No | Whether the comment is resolved |
Implementation Reference
- src/tools/comment-tools.ts:170-194 (registration)Registration of the 'update_comment' tool on the MCP server with its Zod schema (comment_id, comment_text, assignee, resolved) and handler that delegates to commentsClient.updateComment.
// Register update_comment tool server.tool( 'update_comment', 'Update an existing ClickUp comment\'s properties including text, assignee, and resolved status.', { comment_id: z.string().describe('The ID of the comment to update'), comment_text: z.string().describe('The new text content of the comment'), assignee: z.number().optional().describe('The ID of the user to assign to the comment'), resolved: z.boolean().optional().describe('Whether the comment is resolved') }, async ({ comment_id, ...commentParams }) => { try { const result = await commentsClient.updateComment(comment_id, commentParams as UpdateCommentParams); return { content: [{ type: 'text', text: JSON.stringify(result, null, 2) }] }; } catch (error: any) { console.error('Error updating comment:', error); return { content: [{ type: 'text', text: `Error updating comment: ${error.message}` }], isError: true }; } } ); - src/tools/comment-tools.ts:180-193 (handler)Handler function for the 'update_comment' tool. It calls commentsClient.updateComment(comment_id, commentParams) and returns the result as JSON, or an error message on failure.
async ({ comment_id, ...commentParams }) => { try { const result = await commentsClient.updateComment(comment_id, commentParams as UpdateCommentParams); return { content: [{ type: 'text', text: JSON.stringify(result, null, 2) }] }; } catch (error: any) { console.error('Error updating comment:', error); return { content: [{ type: 'text', text: `Error updating comment: ${error.message}` }], isError: true }; } } - src/tools/comment-tools.ts:174-179 (schema)Zod input schema for the 'update_comment' tool: requires comment_id (string) and comment_text (string), optional assignee (number) and resolved (boolean).
{ comment_id: z.string().describe('The ID of the comment to update'), comment_text: z.string().describe('The new text content of the comment'), assignee: z.number().optional().describe('The ID of the user to assign to the comment'), resolved: z.boolean().optional().describe('Whether the comment is resolved') }, - The CommentsClient.updateComment method that sends a PUT request to /comment/{commentId} with the provided params.
async updateComment(commentId: string, params: UpdateCommentParams): Promise<Comment> { return this.client.put(`/comment/${commentId}`, params); } - src/clickup-client/comments.ts:78-82 (schema)The UpdateCommentParams TypeScript interface defining the shape: comment_text (string), assignee (optional number), resolved (optional boolean).
export interface UpdateCommentParams { comment_text: string; assignee?: number; resolved?: boolean; }