create_threaded_comment
Add a threaded reply to an existing comment in ClickUp, with the option to notify all assignees.
Instructions
Create a new threaded comment (reply) to a parent comment. Supports notification settings.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| comment_id | Yes | The ID of the parent comment | |
| comment_text | Yes | The text content of the comment | |
| notify_all | No | Whether to notify all assignees |
Implementation Reference
- src/tools/comment-tools.ts:244-267 (registration)Registration of the 'create_threaded_comment' MCP tool using server.tool(), with Zod schema input validation (comment_id, comment_text, notify_all) and handler that delegates to commentsClient.createThreadedComment.
// Register create_threaded_comment tool server.tool( 'create_threaded_comment', 'Create a new threaded comment (reply) to a parent comment. Supports notification settings.', { comment_id: z.string().describe('The ID of the parent comment'), comment_text: z.string().describe('The text content of the comment'), notify_all: z.boolean().optional().describe('Whether to notify all assignees') }, async ({ comment_id, ...commentParams }) => { try { const result = await commentsClient.createThreadedComment(comment_id, commentParams as CreateThreadedCommentParams); return { content: [{ type: 'text', text: JSON.stringify(result, null, 2) }] }; } catch (error: any) { console.error('Error creating threaded comment:', error); return { content: [{ type: 'text', text: `Error creating threaded comment: ${error.message}` }], isError: true }; } } ); - src/clickup-client/comments.ts:190-198 (handler)The createThreadedComment method on the CommentsClient class that makes the actual API call via this.client.post('/comment/{commentId}/reply', params).
/** * Create a new threaded comment on a parent comment * @param commentId The ID of the parent comment * @param params The comment parameters * @returns The created threaded comment */ async createThreadedComment(commentId: string, params: CreateThreadedCommentParams): Promise<Comment> { return this.client.post(`/comment/${commentId}/reply`, params); } - src/clickup-client/comments.ts:89-92 (schema)The CreateThreadedCommentParams interface defining the input shape: comment_text (string) and notify_all (optional boolean).
export interface CreateThreadedCommentParams { comment_text: string; notify_all?: boolean; } - src/index.ts:40-47 (registration)The setupTools method in the ClickUpServer class that calls setupCommentTools(this.server), indirectly registering the create_threaded_comment tool.
private setupTools() { // Set up all tools setupTaskTools(this.server); setupDocTools(this.server); setupSpaceTools(this.server); setupChecklistTools(this.server); setupCommentTools(this.server); }