Skip to main content
Glama

note_findNotes

Retrieve Anki note IDs based on a specified search query to streamline note management and organization within your Anki flashcards.

Instructions

Returns an array of note IDs for a given Anki search query.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYesAnki search query (e.g., 'deck:current card:1').

Implementation Reference

  • The handler function for the 'findNotes' tool on note_mcp, which becomes 'note_findNotes' after prefixing during registration. It takes an Anki search query and returns a list of note IDs by calling the underlying anki_call.
    @note_mcp.tool( name="findNotes", description="Returns an array of note IDs for a given Anki search query.", ) async def find_notes_tool( query: Annotated[ str, Field(description="Anki search query (e.g., 'deck:current card:1').") ], ) -> List[int]: return await anki_call("findNotes", query=query)
  • Registration of sub-servers into the main anki_mcp server. Specifically, import_server("note", note_mcp) prefixes all tools from note_service.py with 'note_', making 'findNotes' available as 'note_findNotes'.
    await anki_mcp.import_server("deck", deck_mcp) await anki_mcp.import_server("note", note_mcp) await anki_mcp.import_server("card", card_mcp) await anki_mcp.import_server("model", model_mcp) await anki_mcp.import_server("media", media_mcp)
  • The tool schema defined by the decorator and function signature: input query:str, output List[int].
    @note_mcp.tool( name="findNotes", description="Returns an array of note IDs for a given Anki search query.", ) async def find_notes_tool( query: Annotated[ str, Field(description="Anki search query (e.g., 'deck:current card:1').") ], ) -> List[int]: return await anki_call("findNotes", query=query)
  • Uses the helper anki_call from common.py to invoke the AnkiConnect 'findNotes' API.
    return await anki_call("findNotes", query=query)

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/ujisati/anki-mcp'

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