From ed5b8d164494267ffbf8e3c006a3a849340743fd Mon Sep 17 00:00:00 2001 From: shiyue <935732994@qq.com> Date: Mon, 24 Aug 2026 20:51:22 +0800 Subject: [PATCH] fix(mcp): expose board lists and labels --- packages/mcp/src/tools/board.ts | 30 ++++++++++++++++++++++-------- 1 file changed, 22 insertions(+), 8 deletions(-) diff --git a/packages/mcp/src/tools/board.ts b/packages/mcp/src/tools/board.ts index 615bb74c..3b75307c 100644 --- a/packages/mcp/src/tools/board.ts +++ b/packages/mcp/src/tools/board.ts @@ -91,21 +91,35 @@ export function registerBoardTools(server: McpServer): void { server.tool( "create_board", - "Create a new board in a workspace", + "Create a new board in a workspace, optionally with initial lists and labels", { workspacePublicId: z.string().describe("The workspace's public ID"), name: z.string().describe("Board name"), - slug: z.string().optional().describe("URL-friendly slug (auto-generated if omitted)"), - visibility: z - .enum(["public", "private"]) + lists: z + .array(z.string().min(1)) + .default([]) + .describe("Initial list names, for example [\"Backlog\", \"In Progress\", \"Done\"]"), + labels: z + .array(z.string().min(1)) + .default([]) + .describe("Initial label names, for example [\"Bug\", \"Feature\"]"), + type: z + .enum(["regular", "template"]) .optional() - .describe("Board visibility (default: private)"), + .describe("Board type (defaults to regular)"), + sourceBoardPublicId: z + .string() + .min(12) + .optional() + .describe("Source board public ID when cloning an existing board"), }, - async ({ workspacePublicId, name, slug, visibility }) => { + async ({ workspacePublicId, name, lists, labels, type, sourceBoardPublicId }) => { const data = await kanRequest("POST", `/workspaces/${workspacePublicId}/boards`, { name, - slug, - visibility, + lists, + labels, + type, + sourceBoardPublicId, }); return { content: [{ type: "text", text: JSON.stringify(data, null, 2) }] }; },