Skip to main content
Glama

note_addNotes

Add multiple notes to Anki flashcards using AnkiConnect. Create notes in batches for efficient flashcard management.

Instructions

Creates multiple notes. See 'addNote' for the structure of each note object in the list. Returns a list of new note IDs, or null for notes that couldn't be created.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
notesYesA list of note objects to add.

Implementation Reference

  • Handler function for 'note_addNotes' tool. Decorated with @note_mcp.tool(name='addNotes'), it invokes AnkiConnect's 'addNotes' API via anki_call to create multiple notes.
    @note_mcp.tool(
        name="addNotes",
        description="Creates multiple notes. See 'addNote' for the structure of each note object in the list. Returns a list of new note IDs, or null for notes that couldn't be created.",
    )
    async def add_notes_tool(
        notes: Annotated[
            List[Dict[str, Any]], Field(description="A list of note objects to add.")
        ],
    ) -> List[Optional[int]]:
        return await anki_call("addNotes", notes=notes)
  • Registers all tools from note_mcp (including 'addNotes') into the main anki_mcp server with the 'note_' prefix, resulting in 'note_addNotes'.
    await anki_mcp.import_server("note", note_mcp)
  • Helper function used by note_addNotes handler to make HTTP calls to AnkiConnect API.
    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                                                                        
Behavior3/5

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

With no annotations provided, the description carries full disclosure burden. It clearly indicates this is a creation/write operation and describes the return behavior (list of IDs with null for failures). However, it doesn't mention authentication requirements, rate limits, error handling specifics, or whether operations are atomic.

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?

Two sentences with zero waste: the first states purpose and references sibling tool, the second describes return behavior. Every word serves a clear purpose, and the most critical information (what it does) is front-loaded.

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

Completeness4/5

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

For a creation tool with no annotations and no output schema, the description adequately covers the core functionality and return format. However, it lacks details about error conditions, partial success handling, or performance characteristics that would be helpful for a batch operation.

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 'notes' parameter. The description adds value by referencing 'addNote' for note structure details, but doesn't provide additional semantic context beyond what's implied by the schema's array type.

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 multiple notes'), identifies the resource ('notes'), and distinguishes from its sibling 'note_addNote' by referencing it for structural details. This provides precise differentiation within the tool family.

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

Usage Guidelines4/5

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

The description explicitly references 'addNote' for note structure, providing clear guidance on when to use this tool versus its sibling for single-note creation. However, it doesn't specify when to choose this batch tool over multiple calls to 'addNote' or mention any prerequisites for batch operations.

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