Skip to main content
Glama

note_deleteNotes

Remove notes from Anki flashcards by specifying their IDs to manage your study materials effectively.

Instructions

Deletes notes with the given IDs.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
notesYesA list of note IDs to delete.

Implementation Reference

  • Handler function `delete_notes_tool` for the `note_deleteNotes` tool. It calls the AnkiConnect `deleteNotes` action with the provided note IDs.
    @note_mcp.tool(name="deleteNotes", description="Deletes notes with the given IDs.") async def delete_notes_tool( notes: Annotated[List[int], Field(description="A list of note IDs to delete.")], ) -> None: return await anki_call("deleteNotes", notes=notes)
  • Registers all tools from `note_mcp` (including `deleteNotes`) into the main `anki_mcp` server with the 'note_' prefix, resulting in the tool name `note_deleteNotes`.
    await anki_mcp.import_server("note", note_mcp)
  • Helper function `anki_call` that performs HTTP POST requests to the AnkiConnect server, used by the tool handler to execute the `deleteNotes` action.
    async def anki_call(action: str, **params: Any) -> Any: async with httpx.AsyncClient() as client: payload = {"action": action, "version": 6, "params": params} result = await client.post(ANKICONNECT_URL, json=payload) result.raise_for_status() result_json = result.json() error = result_json.get("error") if error: raise Exception(f"AnkiConnect error for action '{action}': {error}") response = result_json.get("result") if "result" in result_json: return response return result_json

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