Skip to main content
Glama

Import notes from file

anki_import_file
Idempotent

Import a .txt, .tsv, or .csv file into an existing Anki deck, mapping each row to a note with columns, headers, and per-row tag rules.

Instructions

Import a .txt/.tsv/.csv file into an existing deck, one note per row.

Columns map to fields: from columns (e.g. ["Front", "Back", "tags"]; "" skips a column, "tags" means space-separated tags), else from a header row, else in the note type's field order. has_header: None = auto (first row equals field names). Anki "Notes in Plain Text" exports (#separator:/#columns: lines) work. tags: added to every row. tag_rules: per-row tags, e.g. [{"field": "Front", "starts_with": "GRAMMAR:", "tag": "grammar"}] (also "contains" or "regex"; "case_sensitive": false by default). default_tag: tag for rows that match no rule. Duplicate handling, model default and dry_run work like anki_add_notes.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "path": "<path>",
      "deck": "<deck>"
    },
    "name": "anki_import_file"
  }
}

Input Schema

NameRequiredDescriptionDefault
deckYes
pathYes
tagsNo
modelNo
columnsNo
dry_runNo
delimiterNoauto
tag_rulesNo
allow_htmlNo
has_headerNo
default_tagNo
duplicate_scopeNocollection

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.0

TDQS

A3.8/5.0
Behavior4/5

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

Annotations already establish idempotent=true, destructive=false and non-readOnly, so the safety profile is covered. The description adds genuine behavioral content beyond that: the three-way column-mapping fallback chain, has_header auto-detection by comparing the first row to field names, tag propagation to every row, and rule evaluation with case_sensitive defaulting to false. It leaves out failure behavior (what happens if parsing errors mid-file) and whether media/HTML is affected, which are the remaining gaps.

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?

Front-loads the one-line purpose, then layers column mapping, tags, and rule examples in a compact order with no filler sentences. The telegraphic syntax (backtick fragments, a bare example object mid-sentence) is efficient but slightly harder to parse on first read.

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?

With an output schema present and 12 parameters, the description covers the tricky parts (column resolution, header auto-detection, tag rules) well enough for an agent to call it correctly. The omissions of delimiter and allow_html semantics are the only meaningful holes in an otherwise complete definition.

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?

Schema coverage is 0%, so the description carries the full parameter burden, and it documents most of the non-obvious ones: columns with the "" skip and "tags" sentinels, has_header with its auto/None behavior, tags, tag_rules with a concrete example plus contains/regex/case_sensitive, default_tag, and the duplicate_scope/dry_run/model pass-through. It does not explain `delimiter` (why 'auto' vs the enum choices matters) or `allow_html` (what happens to markup when false), leaving two behavioral parameters undocumented.

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?

States a specific verb and resource plus the accepted file formats and row granularity ('Import a .txt/.tsv/.csv file into an existing deck, one note per row'), which clearly separates it from the sibling anki_add_notes that takes notes in the request body. It stops short of naming anki_add_notes as the alternative for inline notes, so the distinction is implied rather than stated.

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?

Gives useful format-level guidance (Anki 'Notes in Plain Text' exports with #separator:/#columns: lines work; column source precedence columns > header row > field order) and points to anki_add_notes for duplicate handling, model default, and dry_run semantics. It never says when to prefer this tool over anki_add_notes or what to do when the file's structure is unknown, so usage is implied rather than spelled out.

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