fix(mcp): expose board lists and labels
This commit is contained in:
@@ -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) }] };
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user