Skip to main content
Glama
anki-connect-mcp
by SolarianGG

application.importFile

application_importFile
Destructive

Import files into your Anki collection by opening the interactive import workflow, choosing a file automatically when no path is given or importing a specified file on the Anki machine.

Instructions

Run the interactive import workflow, including file choice when omitted.

Anki-Connect method application.importFile. Scope: collection. Effect: write. Completion: operation. Undo: clears.

Long-running operation: by default the server waits for the final result (see waitForCompletion / timeoutSeconds).

Possible errors: cancelled, collectionUnavailable, editorConflict, internalError, invalidParams, ioError, notFound, staleSession.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "application_importFile"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathNoFile to import on the machine running Anki; omit to let the user choose.
sessionNoOptional. Collection session ID: the `session` field returned by `collection_get`. Usually omit it — the server then uses the session current at the time of the call. Pass it to make the call fail with `staleSession` instead of acting on a different profile/collection than the one your IDs, cursors and tokens came from.
timeoutSecondsNoMCP option (not sent to Anki): how long to wait for completion. A timeout does not cancel the work; the pending record is returned.
waitForCompletionNoMCP option (not sent to Anki): poll operations.get until the operation finishes and return its final record. If false, return the operation handle.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.8/5.0
Behavior4/5

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

Annotations already declare destructiveHint=true and readOnlyHint=false, but the description adds real value beyond them: scope (collection), effect (write), completion model (operation), undo semantics ('Undo: clears'), the long-running wait/timeout behavior, and an enumerated error taxonomy including staleSession and editorConflict. The only weakness is that 'Undo: clears' is terse and does not say precisely what is cleared.

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 action, then uses compact labeled lines (Scope, Effect, Completion, Undo) and a single sentence for the long-running behavior and error list. No sentence is redundant with another.

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 no output schema, the description carries the burden of explaining what happens on completion, and it does so via the operation/completion and waitForCompletion notes plus the error list. It is nearly complete; only the exact result payload and the precise meaning of the undo behavior are left unstated.

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 all four parameters are already documented in the schema, including the omit-to-choose behavior for `path` and the MCP-only nature of `waitForCompletion`/`timeoutSeconds`. The description's 'including file choice when omitted' merely restates the schema, so the baseline of 3 applies.

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 states a specific verb and resource ('Run the interactive import workflow') and clarifies the file-choice behavior when `path` is omitted. It is distinguishable from `packages_import` only implicitly, since it never names that sibling or explains the difference between an interactive import and a package import.

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?

Usage is implied by 'interactive import workflow' and the note that the file can be chosen by the user, but there is no explicit when-to-use guidance and no mention of when to prefer `packages_import` or `advanced_reviews_import` instead. The agent must infer the choice from the tool name alone.

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

Deploy Server

Other Tools