remove_deck_config
Remove a deck configuration by its ID from Anki MCP. This tool helps streamline deck management and maintain organized study setups.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| configId | Yes | ID of the deck configuration to remove |
Implementation Reference
- src/tools/decks.ts:135-156 (handler)The async handler function that implements the core logic of the 'remove_deck_config' tool by calling AnkiConnect's removeDeckConfigId method.async ({ configId }) => { try { const result = await ankiClient.deck.removeDeckConfigId({ configId }); if (!result) { throw new Error('Failed to remove deck configuration - operation returned false'); } return { content: [ { type: 'text', text: `Successfully removed deck configuration with ID: ${configId}`, }, ], }; } catch (error) { throw new Error( `Failed to remove deck configuration: ${error instanceof Error ? error.message : String(error)}` ); } }
- src/tools/decks.ts:132-134 (schema)Zod schema defining the input parameter 'configId' for the 'remove_deck_config' tool.{ configId: z.number().describe('ID of the deck configuration to remove'), },
- src/tools/decks.ts:130-157 (registration)The MCP server.tool registration for the 'remove_deck_config' tool, including schema and handler.server.tool( 'remove_deck_config', { configId: z.number().describe('ID of the deck configuration to remove'), }, async ({ configId }) => { try { const result = await ankiClient.deck.removeDeckConfigId({ configId }); if (!result) { throw new Error('Failed to remove deck configuration - operation returned false'); } return { content: [ { type: 'text', text: `Successfully removed deck configuration with ID: ${configId}`, }, ], }; } catch (error) { throw new Error( `Failed to remove deck configuration: ${error instanceof Error ? error.message : String(error)}` ); } } );