Skip to main content
Glama

delete_comment

Delete a comment from ClickUp by providing its ID. Removes the specified comment permanently.

Instructions

Delete a comment from ClickUp.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
comment_idYesThe ID of the comment to delete

Implementation Reference

  • The delete_comment tool handler registered with the MCP server. It accepts a comment_id parameter, calls the commentsClient.deleteComment method, and returns the result or an error.
    // Register delete_comment tool
    server.tool(
      'delete_comment',
      'Delete a comment from ClickUp.',
      {
        comment_id: z.string().describe('The ID of the comment to delete')
      },
      async ({ comment_id }) => {
        try {
          const result = await commentsClient.deleteComment(comment_id);
          return {
            content: [{ type: 'text', text: JSON.stringify(result, null, 2) }]
          };
        } catch (error: any) {
          console.error('Error deleting comment:', error);
          return {
            content: [{ type: 'text', text: `Error deleting comment: ${error.message}` }],
            isError: true
          };
        }
      }
    );
  • The CommentsClient.deleteComment method that makes the actual HTTP DELETE request to /comment/{commentId} via the ClickUp client.
    /**
     * Delete a comment
     * @param commentId The ID of the comment to delete
     * @returns Success message
     */
    async deleteComment(commentId: string): Promise<{ success: boolean }> {
      return this.client.delete(`/comment/${commentId}`);
    }
  • The setupCommentTools function registers all comment-related tools, including delete_comment (line 196-217), on the MCP server.
    export function setupCommentTools(server: McpServer): void {
      // Register get_task_comments tool
      server.tool(
        'get_task_comments',
        'Get comments for a ClickUp task. Returns comment details including text, author, and timestamps.',
        {
          task_id: z.string().describe('The ID of the task to get comments for'),
          start: z.number().optional().describe('Pagination start (timestamp)'),
          start_id: z.string().optional().describe('Pagination start ID')
        },
        async ({ task_id, ...params }) => {
          try {
            const result = await commentsClient.getTaskComments(task_id, params);
            return {
              content: [{ type: 'text', text: JSON.stringify(result, null, 2) }]
            };
          } catch (error: any) {
            console.error('Error getting task comments:', error);
            return {
              content: [{ type: 'text', text: `Error getting task comments: ${error.message}` }],
              isError: true
            };
          }
        }
      );
    
      // Register create_task_comment tool
      server.tool(
        'create_task_comment',
        'Create a new comment on a ClickUp task. Supports optional assignee and notification settings.',
        {
          task_id: z.string().describe('The ID of the task to comment on'),
          comment_text: z.string().describe('The text content of the comment'),
          assignee: z.number().optional().describe('The ID of the user to assign to the comment'),
          notify_all: z.boolean().optional().describe('Whether to notify all assignees')
        },
        async ({ task_id, ...commentParams }) => {
          try {
            const result = await commentsClient.createTaskComment(task_id, commentParams as CreateTaskCommentParams);
            return {
              content: [{ type: 'text', text: JSON.stringify(result, null, 2) }]
            };
          } catch (error: any) {
            console.error('Error creating task comment:', error);
            return {
              content: [{ type: 'text', text: `Error creating task comment: ${error.message}` }],
              isError: true
            };
          }
        }
      );
    
      // Register get_chat_view_comments tool
      server.tool(
        'get_chat_view_comments',
        'Get comments for a ClickUp chat view. Returns comment details with pagination support.',
        {
          view_id: z.string().describe('The ID of the chat view to get comments for'),
          start: z.number().optional().describe('Pagination start (timestamp)'),
          start_id: z.string().optional().describe('Pagination start ID')
        },
        async ({ view_id, ...params }) => {
          try {
            const result = await commentsClient.getChatViewComments(view_id, params);
            return {
              content: [{ type: 'text', text: JSON.stringify(result, null, 2) }]
            };
          } catch (error: any) {
            console.error('Error getting chat view comments:', error);
            return {
              content: [{ type: 'text', text: `Error getting chat view comments: ${error.message}` }],
              isError: true
            };
          }
        }
      );
    
      // Register create_chat_view_comment tool
      server.tool(
        'create_chat_view_comment',
        'Create a new comment in a ClickUp chat view. Supports notification settings.',
        {
          view_id: z.string().describe('The ID of the chat view to comment on'),
          comment_text: z.string().describe('The text content of the comment'),
          notify_all: z.boolean().optional().describe('Whether to notify all assignees')
        },
        async ({ view_id, ...commentParams }) => {
          try {
            const result = await commentsClient.createChatViewComment(view_id, commentParams as CreateChatViewCommentParams);
            return {
              content: [{ type: 'text', text: JSON.stringify(result, null, 2) }]
            };
          } catch (error: any) {
            console.error('Error creating chat view comment:', error);
            return {
              content: [{ type: 'text', text: `Error creating chat view comment: ${error.message}` }],
              isError: true
            };
          }
        }
      );
    
      // Register get_list_comments tool
      server.tool(
        'get_list_comments',
        'Get comments for a ClickUp list. Returns comment details with pagination support.',
        {
          list_id: z.string().describe('The ID of the list to get comments for'),
          start: z.number().optional().describe('Pagination start (timestamp)'),
          start_id: z.string().optional().describe('Pagination start ID')
        },
        async ({ list_id, ...params }) => {
          try {
            const result = await commentsClient.getListComments(list_id, params);
            return {
              content: [{ type: 'text', text: JSON.stringify(result, null, 2) }]
            };
          } catch (error: any) {
            console.error('Error getting list comments:', error);
            return {
              content: [{ type: 'text', text: `Error getting list comments: ${error.message}` }],
              isError: true
            };
          }
        }
      );
    
      // Register create_list_comment tool
      server.tool(
        'create_list_comment',
        'Create a new comment on a ClickUp list. Supports optional assignee and notification settings.',
        {
          list_id: z.string().describe('The ID of the list to comment on'),
          comment_text: z.string().describe('The text content of the comment'),
          assignee: z.number().optional().describe('The ID of the user to assign to the comment'),
          notify_all: z.boolean().optional().describe('Whether to notify all assignees')
        },
        async ({ list_id, ...commentParams }) => {
          try {
            const result = await commentsClient.createListComment(list_id, commentParams as CreateListCommentParams);
            return {
              content: [{ type: 'text', text: JSON.stringify(result, null, 2) }]
            };
          } catch (error: any) {
            console.error('Error creating list comment:', error);
            return {
              content: [{ type: 'text', text: `Error creating list comment: ${error.message}` }],
              isError: true
            };
          }
        }
      );
    
      // 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
            };
          }
        }
      );
    
      // Register delete_comment tool
      server.tool(
        'delete_comment',
        'Delete a comment from ClickUp.',
        {
          comment_id: z.string().describe('The ID of the comment to delete')
        },
        async ({ comment_id }) => {
          try {
            const result = await commentsClient.deleteComment(comment_id);
            return {
              content: [{ type: 'text', text: JSON.stringify(result, null, 2) }]
            };
          } catch (error: any) {
            console.error('Error deleting comment:', error);
            return {
              content: [{ type: 'text', text: `Error deleting comment: ${error.message}` }],
              isError: true
            };
          }
        }
      );
    
      // Register get_threaded_comments tool
      server.tool(
        'get_threaded_comments',
        'Get threaded comments (replies) for a parent comment. Returns comment details with pagination support.',
        {
          comment_id: z.string().describe('The ID of the parent comment'),
          start: z.number().optional().describe('Pagination start (timestamp)'),
          start_id: z.string().optional().describe('Pagination start ID')
        },
        async ({ comment_id, ...params }) => {
          try {
            const result = await commentsClient.getThreadedComments(comment_id, params);
            return {
              content: [{ type: 'text', text: JSON.stringify(result, null, 2) }]
            };
          } catch (error: any) {
            console.error('Error getting threaded comments:', error);
            return {
              content: [{ type: 'text', text: `Error getting threaded comments: ${error.message}` }],
              isError: true
            };
          }
        }
      );
    
      // 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
            };
          }
        }
      );
    }
  • The input schema for the delete_comment tool: requires comment_id as a string.
    {
      comment_id: z.string().describe('The ID of the comment to delete')
    },
  • src/index.ts:8-8 (registration)
    Import of setupCommentTools from the comment-tools module.
    import { setupCommentTools } from './tools/comment-tools.js';
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

The description only indicates a destructive action but does not disclose any behavioral traits beyond that. Without annotations, more detail is expected, such as whether deletion is permanent or if it cascades to related data.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, focused sentence with no unnecessary words, making it highly concise and easy to parse.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the simplicity (1 parameter, no output schema, no annotations), the description adequately covers the core function but lacks any additional context like return type or error handling.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so baseline is 3. The description adds no extra meaning beyond the schema; it merely restates the function.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description explicitly states the action ('Delete') and the resource ('a comment from ClickUp'), clearly distinguishing it from sibling tools like update_comment or create_task_comment.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance is provided on when to use this tool versus alternatives, nor any prerequisites or side effects (e.g., deletion is irreversible, requires permissions).

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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/nsxdavid/clickup-mcp-server'

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