Skip to main content
Glama

delete_card

Permanently delete a card from Codecks project management. Use archive_card for reversible removal.

Instructions

Permanently delete a card. Cannot be undone — use archive_card if reversibility needed.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
card_idYesFull 36-char UUID

Implementation Reference

  • Tool registration: Registers 'delete_card' MCP tool with title, description, input schema (card_id UUID), and handler that validates the UUID and calls client.deleteCard().
    server.registerTool( "delete_card", { title: "Delete Card", description: "Permanently delete a card. Cannot be undone — use archive_card if reversibility needed.", inputSchema: z.object({ card_id: z.string().describe("Full 36-char UUID"), }), }, async (args) => { try { validateUuid(args.card_id); const result = await client.deleteCard(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 implementation: deleteCard() dispatches 'cards/remove' action with the cardId to the Codecks API.
    async deleteCard(cardId: string): Promise<Record<string, unknown>> { const result = await dispatch("cards/remove", { cardId }); return { ok: true, card_id: cardId, result }; }
  • Dispatch function: Routes API requests to /dispatch/{path} endpoint with POST method.
    export async function dispatch(path: string, data: unknown): Promise<Record<string, unknown>> { return sessionRequest(`/dispatch/${path}`, data); }
  • UUID validation helper: Validates that card_id is a 36-character UUID string with exactly 4 hyphens.
    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; }

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