Skip to main content
Glama

note_updateNoteFields

Modify the fields of an existing Anki flashcard note to update its content and media attachments.

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

  • Handler function that defines and implements the 'updateNoteFields' tool (prefixed to 'note_updateNoteFields' on registration). It validates input via Pydantic and calls the AnkiConnect API.
    @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 tools from note_mcp (including updateNoteFields) into the main anki_mcp server with the 'note_' prefix, making it available as 'note_updateNoteFields'.
    await anki_mcp.import_server("note", note_mcp)
  • Shared helper function used by all tools to make HTTP requests to the AnkiConnect API, executing the actual 'updateNoteFields' 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                                                                        
  • Pydantic schema definition for the tool's input parameter 'note', specifying the required structure.
        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)
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It states the tool modifies fields, implying a mutation, but lacks details on permissions, side effects, error handling, or response format. This leaves significant gaps for an agent to understand the tool's behavior.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that directly states the tool's purpose without unnecessary words. It is front-loaded and appropriately sized, earning a high score for conciseness.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the complexity of a mutation tool with no annotations and no output schema, the description is inadequate. It doesn't explain what happens on success or failure, what fields can be modified, or how it differs from similar tools, leaving the agent with incomplete context for safe and effective use.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has 100% description coverage, documenting the 'note' parameter thoroughly. The description adds no additional parameter semantics beyond what's in the schema, so it meets the baseline of 3 without compensating or detracting.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('modifies') and resource ('fields of an existing note'), which is specific and unambiguous. However, it doesn't differentiate from sibling tools like 'note_updateNote' or 'note_addNote', which limits its score to 4 rather than 5.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives like 'note_updateNote' or 'note_addNote', nor does it mention prerequisites or exclusions. It merely states what the tool does without context, which is insufficient for effective tool selection.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

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

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