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

packages.export

packages_export

Export a specified Anki deck as an .apkg package to a chosen filesystem path, optionally including review history and scheduling data for backup or sharing.

Instructions

Export the specified deck package.

Anki-Connect method packages.export. Scope: collection. Effect: filesystem. Completion: operation. Undo: none.

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

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

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": {
      "deck": "<deck>",
      "path": "<path>"
    },
    "name": "packages_export"
  }
}

Input Schema

NameRequiredDescriptionDefault
deckYesDeck to export: exactly one of {"id": "<deckId>"} or {"name": "<full deck name, e.g. Japanese::Verbs>"}.
pathYesOutput .apkg path on the machine running Anki.
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.
includeSchedulingNoInclude review history and scheduling. Default false.
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.7/5.0
Behavior4/5

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

Beyond the annotations (readOnlyHint=false, destructiveHint=false, openWorldHint=false), the description adds real behavioral context: effect is on the filesystem, there is no undo, it is an asynchronous 'operation' completed via the server, and an enumerated error set including ioError, notFound, and staleSession. It stops short of saying what happens if the path already exists or whether the file is overwritten.

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 definition is compact and front-loaded: purpose first, then a dense one-line trait block, then the async note and error list. The 'Anki-Connect method `packages.export`' line restates the name/title and is pure overhead, but the rest earns its space.

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 still explains the completion model (operation handle vs. final result) and the error surface, which is what an agent needs to call and handle this tool. The main gap is operational detail about the output file itself, such as overwrite behavior and where the path is resolved.

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 deck, path, session, timeoutSeconds, includeScheduling, and waitForCompletion thoroughly. The description only cross-references waitForCompletion/timeoutSeconds as the long-running controls and adds no new semantics for the two required parameters (deck, path).

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 first sentence gives a specific verb and resource ('Export the specified deck package'), which is unambiguous and clearly the inverse of the sibling packages_import. It does not explicitly contrast itself with any sibling, but the verb alone is sufficient to distinguish it.

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 rather than stated: the agent learns this is a collection-scoped, filesystem-writing, long-running operation and that waitForCompletion/timeoutSeconds control blocking behavior. There is no explicit 'use this when...' guidance, no mention of prerequisites (e.g. write permissions on the target directory), and no stated alternative for backing up a collection.

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