Skip to main content
Glama

note_updateNoteFields

Update specific fields of an existing Anki note using the 'anki-mcp' server. Modify text, audio, video, or picture content to refine and enhance flashcard details efficiently.

Instructions

Modifies the fields of an existing note.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
noteYesA dictionary representing the note to update. Must include 'id' and 'fields'. Optionally 'audio', 'video', or 'picture'.

Implementation Reference

  • The handler function for the 'note_updateNoteFields' tool. It takes a note dictionary with 'id' and 'fields', and calls the AnkiConnect 'updateNoteFields' action via anki_call.
    @note_mcp.tool( name="updateNoteFields", description="Modifies the fields of an existing note." ) async def update_note_fields_tool( note: Annotated[ Dict[str, Any], Field( description="A dictionary representing the note to update. Must include 'id' and 'fields'. Optionally 'audio', 'video', or 'picture'." ), ], ) -> None: return await anki_call("updateNoteFields", note=note)
  • Registers all service MCPs (including note_mcp containing updateNoteFields) into the main anki_mcp server with service prefixes like 'note_', resulting in 'note_updateNoteFields'.
    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)
  • Shared helper function that makes asynchronous HTTP POST requests to AnkiConnect API, used by all tool handlers including note_updateNoteFields.
    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