Skip to main content
Glama

delete_card

Remove a card from a GitHub project by specifying its unique identifier. Simplifies project management by enabling quick deletion of obsolete or unnecessary cards.

Instructions

Delete a card from a project

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
card_idYesThe unique identifier of the card

Implementation Reference

  • The core handler function that executes the delete_card tool by sending a DELETE request to the GitHub API endpoint for project cards.
    export async function deleteCard(cardId: number) {
        try {
            const url = `https://api.github.com/projects/columns/cards/${cardId}`;
    
            await githubRequest(url, {
                method: 'DELETE',
                headers: {
                    'Accept': 'application/vnd.github.inertia-preview+json'
                }
            });
    
            return { success: true };
        } catch (error) {
            if (error instanceof GitHubError) {
                throw error;
            }
    
            throw new GitHubError(`Failed to delete card: ${(error as Error).message}`, 500, { error: (error as Error).message });
        }
    }
  • Zod schema defining the input parameters for the delete_card tool (card_id: number).
    export const DeleteCardSchema = z.object({
        card_id: z.number().describe("The unique identifier of the card"),
    });
  • index.ts:260-264 (registration)
    Tool registration in the ListTools response, defining name, description, and input schema for delete_card.
    {
      name: "delete_card",
      description: "Delete a card from a project",
      inputSchema: zodToJsonSchema(projects.DeleteCardSchema),
    },
  • Dispatcher handler in CallToolRequestHandler that parses arguments and invokes the deleteCard function.
    case "delete_card": {
      const args = projects.DeleteCardSchema.parse(request.params.arguments);
      const result = await projects.deleteCard(args.card_id);
      return {
        content: [{ type: "text", text: JSON.stringify(result, null, 2) }],
      };
    }
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It states the action ('Delete') but fails to mention critical details like whether the deletion is permanent, requires specific permissions, triggers side effects (e.g., notifications), or has rate limits. This is inadequate for a destructive operation.

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 a single, efficient sentence with no wasted words, making it easy to parse and understand quickly. It is appropriately sized for the tool's simple purpose.

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

Completeness2/5

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

For a destructive tool with no annotations and no output schema, the description is insufficient. It lacks details on behavioral traits (e.g., permanence, permissions), usage context, and expected outcomes, leaving significant gaps in understanding how to invoke it safely and effectively.

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?

The schema description coverage is 100%, with the parameter 'card_id' documented as 'The unique identifier of the card'. The description adds no additional meaning beyond this, such as format examples or sourcing tips, but the schema provides sufficient baseline information.

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 ('Delete') and resource ('a card from a project'), providing a specific verb+resource combination. However, it does not distinguish this tool from sibling deletion tools like 'delete_issue' or 'delete_project_column', which reduces clarity in a context with multiple deletion operations.

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

Usage Guidelines2/5

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

The description offers no guidance on when to use this tool versus alternatives, such as other deletion tools (e.g., 'delete_issue') or related operations (e.g., 'move_card'). It lacks context about prerequisites, constraints, or typical use cases, leaving the agent with minimal direction.

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

Related 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/tuanle96/mcp-github'

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