From fee82e5e73e0817dea4b6e6fb0f977075a1f4e25 Mon Sep 17 00:00:00 2001 From: Andrey O Date: Mon, 27 Jul 2026 23:18:55 +0300 Subject: [PATCH] fix(mcp): map card.comment content field for Kan API (#540) The MCP add_card_comment and update_card_comment tools send `{ content }` to Kan API, but the API expects `{ comment }`. This causes a 400 Bad Request ("comment: Required") when trying to add or update card comments. Fixed by mapping `{ comment: content }` in both tool handlers. Co-authored-by: Craft Agent --- packages/mcp/src/tools/card.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/mcp/src/tools/card.ts b/packages/mcp/src/tools/card.ts index 8062269d..53a6aa1d 100644 --- a/packages/mcp/src/tools/card.ts +++ b/packages/mcp/src/tools/card.ts @@ -119,7 +119,7 @@ export function registerCardTools(server: McpServer): void { content: z.string().describe("Comment text"), }, async ({ cardPublicId, content }) => { - const data = await kanRequest("POST", `/cards/${cardPublicId}/comments`, { content }); + const data = await kanRequest("POST", `/cards/${cardPublicId}/comments`, { comment: content }); return { content: [{ type: "text", text: JSON.stringify(data, null, 2) }] }; }, ); @@ -136,7 +136,7 @@ export function registerCardTools(server: McpServer): void { const data = await kanRequest( "PUT", `/cards/${cardPublicId}/comments/${commentPublicId}`, - { content }, + { comment: content }, ); return { content: [{ type: "text", text: JSON.stringify(data, null, 2) }] }; },