reload_collection
Reload the card collection in Anki MCP to refresh and update all stored data, ensuring changes are instantly accessible for use.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/tools/miscellaneous.ts:336-352 (handler)The handler function for the 'reload_collection' MCP tool. It invokes ankiClient.miscellaneous.reloadCollection() to reload the Anki collection and returns a success message or throws an error.server.tool('reload_collection', {}, async () => { try { await ankiClient.miscellaneous.reloadCollection(); return { content: [ { type: 'text', text: 'Successfully reloaded collection', }, ], }; } catch (error) { throw new Error( `Failed to reload collection: ${error instanceof Error ? error.message : String(error)}` ); } });
- src/tools/miscellaneous.ts:336-352 (registration)Registration of the 'reload_collection' tool using server.tool within the registerMiscellaneousTools function.server.tool('reload_collection', {}, async () => { try { await ankiClient.miscellaneous.reloadCollection(); return { content: [ { type: 'text', text: 'Successfully reloaded collection', }, ], }; } catch (error) { throw new Error( `Failed to reload collection: ${error instanceof Error ? error.message : String(error)}` ); } });