gui_exit_anki
Close the Anki MCP graphical user interface to terminate its session. Use this tool to stop the GUI and ensure proper application shutdown.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/tools/graphical.ts:247-263 (registration)Registers the 'gui_exit_anki' MCP tool with no input schema. The handler calls ankiClient.graphical.guiExitAnki() to exit Anki and returns a success message or throws an error.server.tool('gui_exit_anki', {}, async () => { try { await ankiClient.graphical.guiExitAnki(); return { content: [ { type: 'text', text: 'Successfully sent exit command to Anki', }, ], }; } catch (error) { throw new Error( `Failed to exit Anki: ${error instanceof Error ? error.message : String(error)}` ); } });
- src/tools/graphical.ts:247-263 (handler)The async handler function for the 'gui_exit_anki' tool, which executes the logic to exit Anki via the ankiClient library.server.tool('gui_exit_anki', {}, async () => { try { await ankiClient.graphical.guiExitAnki(); return { content: [ { type: 'text', text: 'Successfully sent exit command to Anki', }, ], }; } catch (error) { throw new Error( `Failed to exit Anki: ${error instanceof Error ? error.message : String(error)}` ); } });