Skip to main content
Glama

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
NameRequiredDescriptionDefault
card_idsYesFull 36-char UUIDs

Implementation Reference

  • 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))),
              },
            ],
          };
        }
      },
    );
  • 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" });
    }
  • Core updateCards implementation that iterates through cardIds and dispatches 'cards/update' API calls for each card
    async 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 };
    }

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/rangogamedev/codecks-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server