close_comment
Resolve comment threads in Codecks project management to maintain organized discussions and track conversation completion.
Instructions
Close (resolve) a comment thread.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| thread_id | Yes | ||
| card_id | Yes | Full 36-char UUID |
Implementation Reference
- src/tools/comments.ts:80-108 (registration)Registers the close_comment tool with the MCP server, including title, description, input schema, and async handler functionserver.registerTool( "close_comment", { title: "Close Comment", description: "Close (resolve) a comment thread.", inputSchema: z.object({ thread_id: z.string(), card_id: z.string().describe("Full 36-char UUID"), }), }, async (args) => { try { validateUuid(args.card_id); const result = await client.closeComment(args.thread_id, args.card_id); return { content: [{ type: "text", text: JSON.stringify(finalizeToolResult(result)) }], }; } catch (err) { return { content: [ { type: "text", text: JSON.stringify(finalizeToolResult(handleError(err))), }, ], }; } }, );
- src/tools/comments.ts:85-88 (schema)Input schema definition for close_comment tool, requiring thread_id and card_id parametersinputSchema: z.object({ thread_id: z.string(), card_id: z.string().describe("Full 36-char UUID"), }),
- src/tools/comments.ts:90-107 (handler)Handler function that validates card_id UUID and calls client.closeComment, returning formatted results or error handlingasync (args) => { try { validateUuid(args.card_id); const result = await client.closeComment(args.thread_id, args.card_id); return { content: [{ type: "text", text: JSON.stringify(finalizeToolResult(result)) }], }; } catch (err) { return { content: [ { type: "text", text: JSON.stringify(finalizeToolResult(handleError(err))), }, ], }; } },
- src/client.ts:617-623 (helper)Helper method in CodecksClient that dispatches the card-conversations/resolve API call to close a comment threadasync closeComment(threadId: string, cardId: string): Promise<Record<string, unknown>> { const result = await dispatch("card-conversations/resolve", { conversationId: threadId, cardId, }); return { ok: true, thread_id: threadId, result }; }