Skip to main content
Glama

delete_comment

Permanently delete a specific comment from Kanboard. Must provide comment ID and explicit confirmation. Returns success indicator and comment ID.

Instructions

Permanently delete a Kanboard comment. DESTRUCTIVE — requires explicit confirm: true. Returns { ok: true, comment_id } on success.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
comment_idYesComment id to permanently delete (required).
confirmYesMust be exactly `true` to confirm permanent deletion.

Implementation Reference

  • The main tool definition for delete_comment. Contains the handler function that validates input via Zod, asserts confirmation, and calls deps.handler.removeComment() to perform the deletion.
    export const deleteCommentTool = {
      name: "delete_comment",
      description:
        "Permanently delete a Kanboard comment. DESTRUCTIVE — requires explicit `confirm: true`. " +
        "Returns { ok: true, comment_id } on success.",
      inputSchema: DeleteCommentInput,
      handler: async (raw: unknown, deps: ToolDeps): Promise<DeleteCommentResult> => {
        const parsed = DeleteCommentInput.safeParse(raw);
        if (!parsed.success) {
          throw new ValidationError(
            "delete_comment",
            parsed.error.issues.map((i) => i.message).join("; "),
            parsed.error.issues,
          );
        }
    
        const input = parsed.data;
        assertConfirmed("delete_comment", input.confirm);
    
        await deps.handler.removeComment(input.comment_id);
    
        return {
          content: [
            { type: "text", text: `Comment ${String(input.comment_id)} deleted permanently.` },
          ],
          structuredContent: { ok: true, comment_id: input.comment_id },
        };
      },
    };
  • Zod input schema for delete_comment. Requires comment_id (positive integer) and confirm (must be literal true).
    export const DeleteCommentInput = z
      .object({
        comment_id: z
          .number()
          .int()
          .positive()
          .describe("Comment id to permanently delete (required)."),
        confirm: z
          .literal(true)
          .describe("Must be exactly `true` to confirm permanent deletion."),
      })
      .strict();
  • The registerTools function that mounts all tools (including deleteCommentTool) on an McpServer instance. The tool is registered at index 170 in the allTools array.
    export function registerTools(server: McpServer, deps: ToolDeps): void {
      for (const tool of allTools) {
        // Cast: each tool handler returns a `{ content, structuredContent }` object
        // that satisfies `CallToolResult`. We use `unknown` in `ToolDef.handler` to
        // keep the per-tool return types encapsulated, so we cast here at the
        // registration boundary where the MCP SDK takes ownership.
        const cb = ((args: Record<string, unknown>) =>
          tool.handler(args, deps)) as unknown as ToolCallback;
    
        server.registerTool(
          tool.name,
          {
            description: tool.description,
            inputSchema: tool.inputSchema,
          },
          cb,
        );
      }
    }
  • allTools array listing deleteCommentTool at index 170. This is the ordered registry used by registerTools.
    export const allTools: readonly ToolDef[] = [
      addProjectUserTool,
      attachFileToTaskTool,
      createColumnTool,
      createCommentTool,
      createProjectTool,
      createSubtaskTool,
      createSwimlaneTool,
      createTaskTool,
      createTasksBatchTool,
      deleteColumnTool,
      deleteCommentTool,
      deleteProjectTool,
      deleteSubtaskTool,
      deleteSwimlaneTool,
      deleteTaskTool,
      deleteTaskFileTool,
      getProjectTool,
      getTaskTool,
      listCategoriesTool,
      listColumnsTool,
      listMyTasksTool,
      listOverdueTasksTool,
      listProjectsTool,
      listSubtasksTool,
      listSwimlanesTool,
      listTasksTool,
      listProjectUsersTool,
      moveColumnTool,
      moveSwimlaneTool,
      moveTaskPositionTool,
      removeProjectUserTool,
      updateColumnTool,
      updateCommentTool,
      updateProjectTool,
      updateSubtaskTool,
      updateSwimlaneTool,
      updateTaskTool,
    ] as const;
  • The KanboardHandler.removeComment() method that calls Kanboard's removeComment API via the JSON-RPC client. This is the low-level API invocation delegated to by the tool handler.
    /**
     * Permanently removes a comment.
     * Kanboard's wire param for this method is `comment_id`.
     * @throws {KanboardApiError} when Kanboard returns false.
     */
    public async removeComment(commentId: number): Promise<void> {
      const raw = await this.#apiClient.call("removeComment", { comment_id: commentId });
      this.#logger.debug({ method: "removeComment" }, "removeComment OK");
      decodeMutation("removeComment", raw);
    }
Behavior4/5

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

The description clearly indicates the destructive behavior ('Permanently delete', 'DESTRUCTIVE'), the required confirmation, and the return format. This adds value beyond the input schema, though it omits details on failure behavior or permissions.

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 extremely concise, consisting of just two sentences that cover purpose, behavior, and return value. No unnecessary words.

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

Completeness4/5

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

For a simple delete operation, the description covers the core behavior and return format. However, it lacks details on error handling, prerequisites, or side effects, which would make it more complete.

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?

Both parameters are fully described in the input schema, so the description adds little new information about them. It reiterates the confirm requirement and mentions the return value, but the return format is not parameter-specific. Baseline is 3 due to high schema coverage.

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 'Permanently delete a Kanboard comment,' which clearly identifies the action and resource. It differentiates from sibling tools like 'create_comment' and 'update_comment' by specifying permanent deletion.

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?

While the description highlights the destructive nature and the confirm requirement, it does not provide any guidance on when to use this tool vs. alternatives (e.g., updating or hiding a comment) or when not to use it.

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/ErnestoCorona/kanboard-mcp'

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