mcp_kanban_list_manager
Manage kanban lists by performing actions like creating, updating, deleting, or retrieving lists and their details directly within Planka Kanban boards.
Instructions
Manage kanban lists with various operations
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| action | Yes | The action to perform | |
| boardId | No | The ID of the board | |
| id | No | The ID of the list | |
| name | No | The name of the list | |
| position | No | The position of the list |
Implementation Reference
- index.ts:176-227 (handler)Main handler function that dispatches list management operations (get_all, create, get_one, update, delete) by calling helper functions from the lists module.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 lists.getLists(args.boardId); break; case "create": if (!args.boardId || !args.name || args.position === undefined) throw new Error( "boardId, name, and position are required for create action" ); result = await lists.createList({ boardId: args.boardId, name: args.name, position: args.position, }); break; case "get_one": if (!args.id) throw new Error("id is required for get_one action"); result = await lists.getList(args.id); break; case "update": if (!args.id || !args.name || args.position === undefined) throw new Error( "id, name, and position are required for update action" ); const { id, ...updateOptions } = args; result = await lists.updateList(id, { name: args.name, position: args.position, }); break; case "delete": if (!args.id) throw new Error("id is required for delete action"); result = await lists.deleteList(args.id); break; default: throw new Error(`Unknown action: ${args.action}`); } return { content: [{ type: "text", text: JSON.stringify(result) }], }; }
- index.ts:167-175 (schema)Zod input schema defining parameters for the tool actions: action enum, id, boardId, name, position.{ action: z .enum(["get_all", "create", "update", "delete", "get_one"]) .describe("The action to perform"), id: z.string().optional().describe("The ID of the list"), boardId: z.string().optional().describe("The ID of the board"), name: z.string().optional().describe("The name of the list"), position: z.number().optional().describe("The position of the list"), },
- index.ts:164-228 (registration)Registration of the mcp_kanban_list_manager tool on the MCP server, providing description, input schema, and handler function.server.tool( "mcp_kanban_list_manager", "Manage kanban lists with various operations", { action: z .enum(["get_all", "create", "update", "delete", "get_one"]) .describe("The action to perform"), id: z.string().optional().describe("The ID of the list"), boardId: z.string().optional().describe("The ID of the board"), name: z.string().optional().describe("The name of the list"), position: z.number().optional().describe("The position of the list"), }, 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 lists.getLists(args.boardId); break; case "create": if (!args.boardId || !args.name || args.position === undefined) throw new Error( "boardId, name, and position are required for create action" ); result = await lists.createList({ boardId: args.boardId, name: args.name, position: args.position, }); break; case "get_one": if (!args.id) throw new Error("id is required for get_one action"); result = await lists.getList(args.id); break; case "update": if (!args.id || !args.name || args.position === undefined) throw new Error( "id, name, and position are required for update action" ); const { id, ...updateOptions } = args; result = await lists.updateList(id, { name: args.name, position: args.position, }); break; case "delete": if (!args.id) throw new Error("id is required for delete action"); result = await lists.deleteList(args.id); break; default: throw new Error(`Unknown action: ${args.action}`); } return { content: [{ type: "text", text: JSON.stringify(result) }], }; } );
- operations/lists.ts:115-142 (helper)Helper function to retrieve all lists for a given board ID, used in 'get_all' action.export async function getLists(boardId: string) { try { // Get the board which includes lists in the response const response = await plankaRequest(`/api/boards/${boardId}`); // Check if the response has the expected structure if ( response && typeof response === "object" && "included" in response && response.included && typeof response.included === "object" && "lists" in (response.included as Record<string, unknown>) ) { // Get the lists from the included property const lists = (response.included as Record<string, unknown>).lists; if (Array.isArray(lists)) { return lists; } } // If we can't find lists in the expected format, return an empty array return []; } catch (error) { // If all else fails, return an empty array return []; } }
- operations/lists.ts:86-107 (helper)Helper function to create a new list in a board, used in 'create' action.export async function createList(options: CreateListOptions) { try { const response = await plankaRequest( `/api/boards/${options.boardId}/lists`, { method: "POST", body: { name: options.name, position: options.position, }, }, ); const parsedResponse = ListResponseSchema.parse(response); return parsedResponse.item; } catch (error) { throw new Error( `Failed to create list: ${ error instanceof Error ? error.message : String(error) }`, ); } }