Skip to main content
Glama

note_addNote

Add a new note to an Anki deck by specifying deck name, model, fields, and optional tags or media attachments.

Instructions

Creates a new note using the given deck, model, fields, and tags. Returns the ID of the created note or null if the note could not be created.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
noteYesA dictionary representing the note to add. Should include 'deckName', 'modelName', 'fields', and optionally 'tags', 'options', 'audio', 'video', 'picture'.

Implementation Reference

  • Handler for the 'note_addNote' tool. Defines the tool logic which proxies to AnkiConnect's 'addNote' via anki_call. The prefix 'note_' is added during registration.
    @note_mcp.tool(
        name="addNote",
        description="Creates a new note using the given deck, model, fields, and tags. Returns the ID of the created note or null if the note could not be created.",
    )
    async def add_note_tool(
        note: Annotated[
            Dict[str, Any],
            Field(
                description="A dictionary representing the note to add. Should include 'deckName', 'modelName', 'fields', and optionally 'tags', 'options', 'audio', 'video', 'picture'."
            ),
        ],
    ) -> Optional[int]:
        return await anki_call("addNote", note=note)
  • Registers the note service tools with prefix 'note', transforming 'addNote' into 'note_addNote'.
    await anki_mcp.import_server("note", note_mcp)
  • Shared helper function that performs HTTP POST requests to the AnkiConnect server, used by all tool handlers including note_addNote.
    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                                                                        
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 mentions the return value (ID or null) but lacks details on permissions, error handling, rate limits, or side effects. For a creation tool with zero annotation coverage, this is a significant gap in transparency.

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 front-loaded with the core purpose in the first sentence and adds return value information in the second. Both sentences earn their place by providing essential details without redundancy, making it appropriately sized and efficient.

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

Completeness3/5

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

Given the tool's complexity (creation operation with nested objects) and lack of annotations and output schema, the description is moderately complete. It covers purpose and return value but misses behavioral aspects like error conditions or side effects, which are important for a mutation tool with no structured safety hints.

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?

Schema description coverage is 100%, so the schema already documents the single 'note' parameter and its structure. The description adds minimal value by listing components like 'deck, model, fields, and tags', but does not provide additional syntax or format details beyond what the schema specifies. Baseline 3 is appropriate when the schema handles most documentation.

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

Purpose5/5

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

The description clearly states the specific action ('Creates a new note') and the resources involved ('deck, model, fields, and tags'), distinguishing it from sibling tools like note_updateNote or note_addNotes. It precisely defines the tool's function without being vague or tautological.

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

Usage Guidelines3/5

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

The description implies usage for creating notes with specific components but does not explicitly state when to use this tool versus alternatives like note_addNotes (plural) or note_updateNote. No exclusions or prerequisites are mentioned, leaving usage context somewhat inferred.

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