save_deck_config
Save a complete deck configuration in Anki MCP, including settings for new cards, reviews, lapses, autoplay, dynamic options, and more, to customize study preferences.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| config | Yes | Complete deck configuration object to save |
Implementation Reference
- src/tools/decks.ts:161-224 (registration)The MCP tool registration for 'save_deck_config', including the input schema validation with Zod and the inline handler function that saves the deck config via AnkiConnect.'save_deck_config', { config: z .object({ id: z.number(), name: z.string(), autoplay: z.boolean(), dyn: z.boolean(), maxTaken: z.number(), mod: z.number(), replayq: z.boolean(), timer: z.number(), usn: z.number(), lapse: z.object({ delays: z.array(z.number()), leechAction: z.number(), leechFails: z.number(), minInt: z.number(), mult: z.number(), }), new: z.object({ bury: z.boolean(), delays: z.array(z.number()), initialFactor: z.number(), ints: z.array(z.number()), order: z.number(), perDay: z.number(), separate: z.boolean(), }), rev: z.object({ bury: z.boolean(), ease4: z.number(), fuzz: z.number(), ivlFct: z.number(), maxIvl: z.number(), minSpace: z.number(), perDay: z.number(), }), }) .describe('Complete deck configuration object to save'), }, async ({ config }) => { try { const result = await ankiClient.deck.saveDeckConfig({ config }); if (!result) { throw new Error('Failed to save deck configuration - operation returned false'); } return { content: [ { type: 'text', text: `Successfully saved deck configuration "${config.name}" (ID: ${config.id})`, }, ], }; } catch (error) { throw new Error( `Failed to save deck configuration: ${error instanceof Error ? error.message : String(error)}` ); } } );