fix(mcp): expose board lists and labels
This commit is contained in:
@@ -91,21 +91,35 @@ export function registerBoardTools(server: McpServer): void {
|
|||||||
|
|
||||||
server.tool(
|
server.tool(
|
||||||
"create_board",
|
"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"),
|
workspacePublicId: z.string().describe("The workspace's public ID"),
|
||||||
name: z.string().describe("Board name"),
|
name: z.string().describe("Board name"),
|
||||||
slug: z.string().optional().describe("URL-friendly slug (auto-generated if omitted)"),
|
lists: z
|
||||||
visibility: z
|
.array(z.string().min(1))
|
||||||
.enum(["public", "private"])
|
.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()
|
.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`, {
|
const data = await kanRequest("POST", `/workspaces/${workspacePublicId}/boards`, {
|
||||||
name,
|
name,
|
||||||
slug,
|
lists,
|
||||||
visibility,
|
labels,
|
||||||
|
type,
|
||||||
|
sourceBoardPublicId,
|
||||||
});
|
});
|
||||||
return { content: [{ type: "text", text: JSON.stringify(data, null, 2) }] };
|
return { content: [{ type: "text", text: JSON.stringify(data, null, 2) }] };
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user