Skip to main content
Glama
gcorroto

Planka MCP Server

by gcorroto

mcp_kanban_membership_manager

Manage board memberships on Planka Kanban boards by performing actions like creating, updating, deleting, or retrieving user roles and permissions for efficient team collaboration.

Instructions

Manage board memberships with various operations

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
actionYesThe action to perform
boardIdNoThe ID of the board
canCommentNoWhether the user can comment on the board
idNoThe ID of the membership
roleNoThe role of the user in the board
userIdNoThe ID of the user

Implementation Reference

  • Core execution logic for the mcp_kanban_membership_manager tool. Handles different actions (get_all, create, get_one, update, delete) by calling corresponding functions from boardMemberships module and returns JSON stringified result.
    async (args) => {
      let result;
    
      switch (args.action) {
        case "get_all":
          if (!args.boardId)
            throw new Error("boardId is required for get_all action");
          result = await boardMemberships.getBoardMemberships(args.boardId);
          break;
    
        case "create":
          if (!args.boardId || !args.userId || !args.role)
            throw new Error(
              "boardId, userId, and role are required for create action"
            );
          result = await boardMemberships.createBoardMembership({
            boardId: args.boardId,
            userId: args.userId,
            role: args.role,
          });
          break;
    
        case "get_one":
          if (!args.id) throw new Error("id is required for get_one action");
          result = await boardMemberships.getBoardMembership(args.id);
          break;
    
        case "update":
          if (!args.id) throw new Error("id is required for update action");
          const membershipUpdateOptions = {} as any;
    
          if (args.role !== undefined) membershipUpdateOptions.role = args.role;
          if (args.canComment !== undefined)
            membershipUpdateOptions.canComment = args.canComment;
    
          result = await boardMemberships.updateBoardMembership(
            args.id,
            membershipUpdateOptions
          );
          break;
    
        case "delete":
          if (!args.id) throw new Error("id is required for delete action");
          result = await boardMemberships.deleteBoardMembership(args.id);
          break;
    
        default:
          throw new Error(`Unknown action: ${args.action}`);
      }
    
      return {
        content: [{ type: "text", text: JSON.stringify(result) }],
      };
    }
  • Input schema validation using Zod for the tool parameters including action, ids, role, and permissions.
    {
      action: z
        .enum(["get_all", "create", "get_one", "update", "delete"])
        .describe("The action to perform"),
      id: z.string().optional().describe("The ID of the membership"),
      boardId: z.string().optional().describe("The ID of the board"),
      userId: z.string().optional().describe("The ID of the user"),
      role: z
        .enum(["editor", "viewer"])
        .optional()
        .describe("The role of the user in the board"),
      canComment: z
        .boolean()
        .optional()
        .describe("Whether the user can comment on the board"),
    },
  • index.ts:716-718 (registration)
    Tool registration call to the MCP server, specifying the tool name and description.
    server.tool(
      "mcp_kanban_membership_manager",
      "Manage board memberships with various operations",
  • Helper function to create a new board membership via Planka API POST request.
    export async function createBoardMembership(
        options: CreateBoardMembershipOptions,
    ) {
        try {
            const response = await plankaRequest(
                `/api/boards/${options.boardId}/memberships`,
                {
                    method: "POST",
                    body: {
                        userId: options.userId,
                        role: options.role,
                    },
                },
            );
            const parsedResponse = BoardMembershipResponseSchema.parse(response);
            return parsedResponse.item;
        } catch (error) {
            throw new Error(
                `Failed to create board membership: ${
                    error instanceof Error ? error.message : String(error)
                }`,
            );
        }
    }
  • Helper function to retrieve all board memberships for a given board ID via Planka API.
    export async function getBoardMemberships(boardId: string) {
        try {
            const response = await plankaRequest(
                `/api/boards/${boardId}/memberships`,
            );
    
            try {
                // Try to parse as a BoardMembershipsResponseSchema first
                const parsedResponse = BoardMembershipsResponseSchema.parse(
                    response,
                );
                return parsedResponse.items;
            } catch (parseError) {
                // If that fails, try to parse as an array directly
                if (Array.isArray(response)) {
                    return z.array(BoardMembershipSchema).parse(response);
                }
    
                // If we get here, we couldn't parse the response in any expected format
                throw new Error(
                    `Could not parse board memberships response: ${
                        JSON.stringify(response)
                    }`,
                );
            }
        } catch (error) {
            // If all else fails, return an empty array
            return [];
        }
    }
Behavior2/5

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

With no annotations provided, the description carries full burden for behavioral disclosure. 'Manage board memberships' implies CRUD operations but doesn't specify permissions needed, rate limits, whether operations are destructive, or what happens when memberships are created/updated/deleted. The description is too generic to provide meaningful behavioral context.

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 extremely concise with just 6 words, which is efficient. However, it's arguably too brief given the complexity of the tool (6 parameters supporting 5 different actions). While front-loaded, it lacks necessary detail that would help an agent understand the tool's scope.

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?

For a tool with 6 parameters supporting 5 different actions (including destructive operations like 'delete'), no annotations, and no output schema, the description is inadequate. It doesn't explain what the tool returns, what the different actions do, or provide any behavioral context needed 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 6 parameters thoroughly. The description adds no additional parameter information beyond what's in the schema. The baseline score of 3 is appropriate when the schema does all the parameter documentation work.

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 'Manage board memberships with various operations' which provides a general purpose (managing memberships) but is vague about what 'manage' entails. It doesn't specify the exact operations available or distinguish this tool from sibling tools like mcp_kanban_project_board_manager which might also handle board-level operations.

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 about when to use this tool versus alternatives. The description doesn't mention sibling tools or provide context about when board membership management is appropriate versus other board-related operations available in the sibling tools.

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