mark_done
Mark cards as completed in Codecks project management by providing their UUIDs to update task status.
Instructions
Mark cards as done.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| card_ids | Yes | Full 36-char UUIDs |
Implementation Reference
- src/tools/mutation.ts:124-151 (registration)Tool registration for 'mark_done' with input schema (card_ids array) and handler that validates UUIDs and calls client.markDone()server.registerTool( "mark_done", { title: "Mark Done", description: "Mark cards as done.", inputSchema: z.object({ card_ids: z.array(z.string()).describe("Full 36-char UUIDs"), }), }, async (args) => { try { validateUuidList(args.card_ids); const result = await client.markDone(args.card_ids); return { content: [{ type: "text", text: JSON.stringify(finalizeToolResult(result)) }], }; } catch (err) { return { content: [ { type: "text", text: JSON.stringify(finalizeToolResult(handleError(err))), }, ], }; } }, );
- src/client.ts:450-452 (handler)Implementation of markDone method that delegates to updateCards with status='done'async markDone(cardIds: string[]): Promise<Record<string, unknown>> { return this.updateCards({ cardIds, status: "done" }); }
- src/client.ts:403-448 (handler)Core updateCards implementation that iterates through cardIds and dispatches 'cards/update' API calls for each cardasync updateCards(options: { cardIds: string[]; status?: string; priority?: string; effort?: string; deck?: string; title?: string; content?: string; milestone?: string; hero?: string; owner?: string; tags?: string; doc?: string; continueOnError?: boolean; }): Promise<Record<string, unknown>> { const updates: Record<string, unknown> = {}; if (options.status) updates.status = options.status; if (options.priority) { updates.priority = options.priority === "null" ? null : options.priority; } if (options.effort) { updates.effort = options.effort === "null" ? null : parseInt(options.effort, 10); } if (options.title) updates.title = options.title; if (options.content !== undefined) updates.content = options.content; const results: Record<string, unknown>[] = []; let updated = 0; for (const cardId of options.cardIds) { try { const r = await dispatch("cards/update", { cardId, update: updates, }); results.push({ card_id: cardId, ok: true, result: r }); updated++; } catch (err) { const msg = err instanceof Error ? err.message : String(err); results.push({ card_id: cardId, ok: false, error: msg }); if (!options.continueOnError) break; } } return { ok: updated > 0, updated, results }; }