Skip to main content
Glama

delete_decks

Remove specified Anki decks and optionally delete associated cards to manage and organize your study materials efficiently.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
deckNamesYesArray of deck names to delete
deleteCardsNoWhether to delete the cards in the decks as well

Implementation Reference

  • Full registration of the 'delete_decks' MCP tool, including Zod input schema and async handler function that deletes specified decks (optionally including cards) via ankiClient.deck.deleteDecks and returns success message.
    server.tool( 'delete_decks', { deckNames: z.array(z.string()).describe('Array of deck names to delete'), deleteCards: z .boolean() .default(true) .describe('Whether to delete the cards in the decks as well'), }, async ({ deckNames, deleteCards }) => { try { await ankiClient.deck.deleteDecks({ decks: deckNames, cardsToo: deleteCards as true, // Type assertion needed due to yanki-connect's strict typing }); return { content: [ { type: 'text', text: `Successfully deleted decks: ${deckNames.join(', ')}${deleteCards ? ' (including cards)' : ' (cards preserved)'}`, }, ], }; } catch (error) { throw new Error( `Failed to delete decks "${deckNames.join(', ')}": ${error instanceof Error ? error.message : String(error)}` ); } } );

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/arielbk/anki-mcp'

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