Skip to main content
Glama

Archive Card

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);
    }
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries full burden. It discloses the key behavioral trait of reversibility, which is crucial for understanding this as a non-destructive operation. However, it lacks details on permissions needed, side effects (e.g., visibility changes), or response format, leaving gaps in behavioral context.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is extremely concise with just three words, front-loading the core action and including a critical qualifier ('reversible') in parentheses. Every element earns its place with zero wasted words, making it highly efficient for quick comprehension.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's moderate complexity (a mutation with reversibility), no annotations, and no output schema, the description is minimally adequate. It covers the core action and key trait but lacks details on permissions, side effects, or return values, which could hinder an agent's ability to use it correctly in all scenarios.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, with the schema fully documenting the single 'card_id' parameter as a 36-char UUID. The description adds no additional parameter semantics beyond what the schema provides, so it meets the baseline of 3 without compensating or adding value.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('Archive') and resource ('a card'), making the purpose immediately understandable. It distinguishes from sibling 'unarchive_card' by specifying direction, though it doesn't explicitly mention other siblings like 'delete_card' for permanent removal.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage context by noting '(reversible)', suggesting this is a soft delete alternative to permanent deletion tools. However, it doesn't explicitly state when to use this versus 'delete_card' or other card modification tools, nor does it mention prerequisites like card existence or permissions.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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