Skip to main content
Glama

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
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • 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)}` ); } });
  • 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)}` ); } });

Other Tools

Related Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/arielbk/anki-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server