Skip to main content
Glama
gcorroto

Planka MCP Server

by gcorroto

mcp_kanban_comment_manager

Perform operations on card comments, including retrieving, creating, updating, and deleting, for effective task management on Planka Kanban boards.

Instructions

Manage card comments with various operations

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
actionYesThe action to perform
cardIdNoThe ID of the card
idNoThe ID of the comment
textNoThe text content of the comment

Implementation Reference

  • The primary handler, schema definition, and registration for the mcp_kanban_comment_manager tool. Dispatches to specific comment operations based on the 'action' parameter.
      "mcp_kanban_comment_manager",
      "Manage card comments with various operations",
      {
        action: z
          .enum(["get_all", "create", "get_one", "update", "delete"])
          .describe("The action to perform"),
        id: z.string().optional().describe("The ID of the comment"),
        cardId: z.string().optional().describe("The ID of the card"),
        text: z.string().optional().describe("The text content of the comment"),
      },
      async (args) => {
        let result;
    
        switch (args.action) {
          case "get_all":
            if (!args.cardId)
              throw new Error("cardId is required for get_all action");
            result = await comments.getComments(args.cardId);
            break;
    
          case "create":
            if (!args.cardId || !args.text)
              throw new Error("cardId and text are required for create action");
            result = await comments.createComment({
              cardId: args.cardId,
              text: args.text,
            });
            break;
    
          case "get_one":
            if (!args.id) throw new Error("id is required for get_one action");
            result = await comments.getComment(args.id);
            break;
    
          case "update":
            if (!args.id || !args.text)
              throw new Error("id and text are required for update action");
            result = await comments.updateComment(args.id, {
              text: args.text,
            });
            break;
    
          case "delete":
            if (!args.id) throw new Error("id is required for delete action");
            result = await comments.deleteComment(args.id);
            break;
    
          default:
            throw new Error(`Unknown action: ${args.action}`);
        }
    
        return {
          content: [{ type: "text", text: JSON.stringify(result) }],
        };
      }
    );
  • Helper function to create a new comment on a card using the Planka API.
    export async function createComment(options: CreateCommentOptions) {
        try {
            const response = await plankaRequest(
                `/api/cards/${options.cardId}/comment-actions`,
                {
                    method: "POST",
                    body: {
                        text: options.text,
                    },
                },
            );
            const parsedResponse = CommentActionResponseSchema.parse(response);
            return parsedResponse.item;
        } catch (error) {
            throw new Error(
                `Failed to create comment: ${
                    error instanceof Error ? error.message : String(error)
                }`,
            );
        }
    }
  • Helper function to retrieve all comments for a specific card.
    export async function getComments(cardId: string) {
        try {
            const response = await plankaRequest(`/api/cards/${cardId}/actions`);
    
            try {
                // Try to parse as a CommentsResponseSchema first
                const parsedResponse = CommentActionsResponseSchema.parse(response);
                // Filter only comment actions
                if (parsedResponse.items && Array.isArray(parsedResponse.items)) {
                    return parsedResponse.items.filter((item) =>
                        item.type === "commentCard"
                    );
                }
                return parsedResponse.items;
            } catch (parseError) {
                // If that fails, try to parse as an array directly
                if (Array.isArray(response)) {
                    const items = z.array(CommentActionSchema).parse(response);
                    // Filter only comment actions
                    return items.filter((item) => item.type === "commentCard");
                }
    
                // If we get here, we couldn't parse the response in any expected format
                throw new Error(
                    `Could not parse comments response: ${
                        JSON.stringify(response)
                    }`,
                );
            }
        } catch (error) {
            // If all else fails, return an empty array
            return [];
        }
    }
  • Helper function to update a comment's text content.
    export async function updateComment(
        id: string,
        options: Partial<Omit<CreateCommentOptions, "cardId">>,
    ) {
        try {
            const response = await plankaRequest(`/api/comment-actions/${id}`, {
                method: "PATCH",
                body: {
                    text: options.text,
                },
            });
            const parsedResponse = CommentActionResponseSchema.parse(response);
            return parsedResponse.item;
        } catch (error) {
            throw new Error(
                `Failed to update comment: ${
                    error instanceof Error ? error.message : String(error)
                }`,
            );
        }
    }
  • Helper function to delete a comment by ID.
    export async function deleteComment(id: string) {
        try {
            await plankaRequest(`/api/comment-actions/${id}`, {
                method: "DELETE",
            });
            return { success: true };
        } catch (error) {
            throw new Error(
                `Failed to delete comment: ${
                    error instanceof Error ? error.message : String(error)
                }`,
            );
        }
    }
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. 'Manage' implies CRUD operations, but it doesn't specify permissions needed, side effects (e.g., if deletions are permanent), rate limits, or response formats. This leaves significant gaps for a tool with multiple actions including destructive ones like delete.

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

Conciseness4/5

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

The description is a single, efficient sentence that states the core function without fluff. However, it could be more front-loaded by specifying the exact operations (e.g., CRUD on card comments) to improve clarity immediately.

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

Completeness2/5

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

Given the complexity of a multi-action tool with no annotations and no output schema, the description is inadequate. It doesn't explain what 'manage' entails, the scope of operations, or expected outcomes, leaving the agent to infer behavior from the schema alone, which is insufficient for safe and effective use.

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 description coverage is 100%, so the schema already documents all parameters fully. The description adds no additional meaning beyond implying that parameters relate to comment operations, but it doesn't clarify dependencies (e.g., cardId required for create) or usage patterns. Baseline 3 is appropriate as the schema handles parameter documentation.

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

Purpose3/5

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

The description states the tool manages card comments with various operations, which provides a basic purpose but lacks specificity. It mentions the resource (card comments) and general action (manage), but doesn't specify what 'manage' entails or distinguish it from sibling tools like mcp_kanban_card_manager or mcp_kanban_task_manager that might also handle comments indirectly.

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. The description doesn't mention prerequisites, context, or exclusions, and with siblings like mcp_kanban_card_manager that might handle card-related operations, there's no indication of how this tool fits into the workflow or when it should be preferred.

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

Related 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/gcorroto/mcp-planka'

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