Skip to main content
Glama
chadlis

anki-mcp

by chadlis

anki_add_note

Add a single note to an Anki deck using specified fields, tags, and note type. Supports HTML content and cloze deletions, with an option to allow duplicates.

Instructions

Add a single note to a deck.

Field values are HTML and are sent verbatim — do not escape them. Write the markup you want rendered on the card:

fields={
    "Text": 'The GIL is released during <b>I/O</b>, so '
            '{{c1::threads}} still help for network-bound work.',
    "Back Extra": '<pre><code>'
                  '<span class="hljs-keyword">async def</span> '
                  '<span class="hljs-title">main</span>(): ...'
                  '</code></pre>',
}

Cloze deletions use {{c1::hidden text}} and require the "Cloze" model (or another cloze-type note type) — the syntax is inert on "Basic".

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tagsNoTags to attach. Anki tags cannot contain spaces; use `::` to nest, e.g. `"python::asyncio"`.
fieldsYesField name -> HTML content. Omitted fields are left empty.
deck_nameYesTarget deck. It must already exist; create it first with `anki_create_deck`.
model_nameYesNote type, e.g. `"Basic"` or `"Cloze"`. Its field names must match `fields` exactly — check with `anki_get_model_fields`.
allow_duplicateNoBy default Anki refuses a note whose first field already exists in the deck. Set True to add it anyway.
response_formatNoHow a tool should render its result. A `StrEnum` so the members compare equal to the plain strings a client sends over the wire (`"markdown"`, `"json"`).markdown

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

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

Annotations only indicate read/write and non-destructive hints, so the description carries the burden of behavioral disclosure. It adds critical context that field values are HTML sent verbatim without escaping, that cloze syntax is inert on 'Basic' notes, and that by default Anki refuses duplicate first fields. This goes well beyond the annotations and discloses non-obvious traits.

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

Conciseness4/5

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

The description is moderately long but every sentence contributes meaningful guidance. The bold warning about HTML escaping is front-loaded, and the code example effectively illustrates usage, though a shorter example could reduce length. It is well-structured and not redundant.

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?

Given the output schema covers return values, the description focuses on the action, prerequisites, and edge cases. It explains the primary functionality, HTML behavior, cloze constraints, and duplicate handling. It does not discuss errors or the response_format parameter, but those are covered by the schema and output schema, making it sufficiently complete.

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

Parameters4/5

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

The input schema covers all parameters with detailed descriptions, so the baseline is 3. The description adds value by clarifying the verbatim HTML rule and demonstrating proper field formatting with an example, which is not fully captured in the schema's brief 'HTML content' description. It does not repeat the schema's parameter explanations.

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 opens with 'Add a single note to a deck', which is a specific verb and resource. It distinguishes from the sibling 'anki_add_notes' through the word 'single', and provides additional context about HTML verbatim and cloze deletions, making the tool's purpose unmistakable.

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 gives clear prerequisites: the deck must be created first with `anki_create_deck`, field names must match the model checked via `anki_get_model_fields`, and cloze syntax requires a cloze-type model. It does not explicitly mention using `anki_add_notes` for multiple notes, but the singular 'single note' implies the distinction, and the prerequisites serve as strong guidance.

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

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