Skip to main content
Glama

archive_card

Archive a project card in Codecks to remove it from active views while preserving its data for future reference or restoration.

Instructions

Archive a card (reversible).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
card_idYesFull 36-char UUID

Implementation Reference

  • Tool registration and handler for 'archive_card'. Defines input schema (card_id as 36-char UUID), validates the UUID using validateUuid(), calls client.archiveCard(args.card_id), and returns the result formatted with finalizeToolResult().
    server.registerTool( "archive_card", { title: "Archive Card", description: "Archive a card (reversible).", inputSchema: z.object({ card_id: z.string().describe("Full 36-char UUID"), }), }, async (args) => { try { validateUuid(args.card_id); const result = await client.archiveCard(args.card_id); return { content: [{ type: "text", text: JSON.stringify(finalizeToolResult(result)) }], }; } catch (err) { return { content: [ { type: "text", text: JSON.stringify(finalizeToolResult(handleError(err))), }, ], }; } }, );
  • Client method that implements the archive logic. Calls the Codecks API via dispatch('cards/update') with visibility set to 'archived' to archive the card.
    async archiveCard(cardId: string): Promise<Record<string, unknown>> { const result = await dispatch("cards/update", { cardId, update: { visibility: "archived" }, }); return { ok: true, card_id: cardId, result }; }
  • Input schema definition using zod. Requires card_id as a string (full 36-char UUID).
    inputSchema: z.object({ card_id: z.string().describe("Full 36-char UUID"), }),
  • UUID validation function used by the handler. Ensures the card_id is a valid 36-character UUID with exactly 4 dashes.
    export function validateUuid(value: string, field = "card_id"): string { if (typeof value !== "string" || value.length !== 36 || (value.match(/-/g) ?? []).length !== 4) { throw new CliError( `[ERROR] ${field} must be a full 36-char UUID, got: ${JSON.stringify(value)}`, ); } return value; }
  • API dispatch function that makes authenticated POST requests to the Codecks API. Used by archiveCard to send the update command.
    export async function dispatch(path: string, data: unknown): Promise<Record<string, unknown>> { return sessionRequest(`/dispatch/${path}`, data); }

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