Skip to main content
Glama

anki_create_deck

Create a new Anki deck programmatically using the Model Context Protocol. Specify the deck name to manage flashcards and organize study materials efficiently.

Instructions

Create a new Anki deck

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
deckNameYesThe name of the deck to create

Implementation Reference

  • The execution handler for the 'create_deck' MCP tool. It retrieves the deckName argument, validates it, calls the YankiConnect client's deck.createDeck method, and returns a success message.
    case "create_deck": { const client = getClient(); const deckName = String(toolArgs.deckName); if (!deckName) { throw new Error( "deckName parameter is required for create_deck tool." ); } await client.deck.createDeck({ deck: deckName }); return { content: [ { type: "text", text: `Successfully created deck: ${deckName}` }, ], }; }
  • The tool schema definition for 'create_deck', including name, description, and inputSchema requiring a 'deckName' string.
    name: "create_deck", description: "Create a new Anki deck.", inputSchema: { type: "object", properties: { deckName: { type: "string", description: "The name of the deck to create.", }, }, required: ["deckName"], }, },
  • Registration of the tool list handler, which includes the 'create_deck' tool from getToolDefinitions() in the response to ListToolsRequest.
    server.setRequestHandler(ListToolsRequestSchema, async () => { console.error( "[MCP Anki Client - tool-manager.ts] Received ListToolsRequest from client." ); const tools = [...getToolDefinitions(), getDeckModelInfoToolDefinition]; return { tools: tools }; });

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

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