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                                                                        
Behavior2/5

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

No annotations are provided, so the description carries full burden. It states the tool deletes notes, implying a destructive mutation, but doesn't disclose critical behaviors: whether deletion is permanent/reversible, permissions required, rate limits, error handling, or what happens to associated data (e.g., cards in Anki context). This is a significant gap for a destructive tool.

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, direct sentence with zero wasted words. It front-loads the key action ('Deletes') and resource, making it immediately understandable. Every word earns its place, and there's no redundancy or fluff.

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?

For a destructive tool with no annotations and no output schema, the description is inadequate. It doesn't cover behavioral aspects (permanence, side effects), error cases, or return values. Given the complexity of deletion in a system like Anki (where notes may link to cards), more context is needed 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?

Schema description coverage is 100%, with the parameter 'notes' clearly documented as an array of note IDs to delete. The description adds no additional meaning beyond the schema (e.g., format examples, constraints like minimum array length). With high schema coverage, the baseline score of 3 is appropriate.

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 ('Deletes') and resource ('notes'), specifying it targets notes with given IDs. It distinguishes from sibling tools like note_addNote or note_updateNote by focusing on deletion. However, it doesn't explicitly differentiate from other deletion tools like deck_deleteDecks or media_deleteMediaFile, which prevents a perfect score.

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. It doesn't mention prerequisites (e.g., note existence), exclusions, or compare to similar tools like note_removeTags or media_deleteMediaFile. The agent must infer usage from the name and context alone.

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