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) }], }; }

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