gui_select_note
Select a specific note in the Anki MCP server by providing its unique ID, enabling precise navigation and management of study materials.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| noteId | Yes | ID of the note to select |
Implementation Reference
- src/tools/graphical.ts:316-338 (registration)Full MCP tool registration for 'gui_select_note', including input schema (noteId: number) and handler function that calls ankiClient.graphical.guiSelectNote to select the note in Anki's GUI browser.server.tool( 'gui_select_note', { noteId: z.number().describe('ID of the note to select'), }, async ({ noteId }) => { try { const result = await ankiClient.graphical.guiSelectNote({ note: noteId }); return { content: [ { type: 'text', text: `Successfully selected note ${noteId}. Result: ${result}`, }, ], }; } catch (error) { throw new Error( `Failed to select note: ${error instanceof Error ? error.message : String(error)}` ); } } );
- src/tools/graphical.ts:321-337 (handler)The core handler logic for the gui_select_note tool, which performs the GUI note selection via the Anki client library and returns a success message.async ({ noteId }) => { try { const result = await ankiClient.graphical.guiSelectNote({ note: noteId }); return { content: [ { type: 'text', text: `Successfully selected note ${noteId}. Result: ${result}`, }, ], }; } catch (error) { throw new Error( `Failed to select note: ${error instanceof Error ? error.message : String(error)}` ); } }
- src/tools/graphical.ts:318-320 (schema)Zod input schema defining the required 'noteId' parameter as a number.{ noteId: z.number().describe('ID of the note to select'), },
- src/tools/miscellaneous.ts:273-273 (helper)'guiSelectNote' listed as a supported AnkiConnect action in the 'multi' tool's action enum, allowing batch execution.'guiSelectNote',