gui_selected_notes
Highlight and interact with selected notes in Anki MCP to streamline card management and review processes, enhancing productivity for users.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/tools/graphical.ts:340-357 (handler)The MCP tool registration and handler implementation for 'gui_selected_notes'. It calls ankiClient.graphical.guiSelectedNotes() to retrieve the IDs of currently selected notes in the Anki browser and returns them as a text content block.// Tool: Get selected notes in the browser server.tool('gui_selected_notes', {}, async () => { try { const noteIds = await ankiClient.graphical.guiSelectedNotes(); return { content: [ { type: 'text', text: `Selected notes: ${JSON.stringify(noteIds)}`, }, ], }; } catch (error) { throw new Error( `Failed to get selected notes: ${error instanceof Error ? error.message : String(error)}` ); } });
- src/tools/graphical.ts:340-357 (registration)Registers the 'gui_selected_notes' tool with the MCP server inside the registerGraphicalTools function.// Tool: Get selected notes in the browser server.tool('gui_selected_notes', {}, async () => { try { const noteIds = await ankiClient.graphical.guiSelectedNotes(); return { content: [ { type: 'text', text: `Selected notes: ${JSON.stringify(noteIds)}`, }, ], }; } catch (error) { throw new Error( `Failed to get selected notes: ${error instanceof Error ? error.message : String(error)}` ); } });