Skip to main content
Glama
Anki Connect MCP Server

Anki Connect MCP Server

Store media file

store_media_file
Idempotent

Stores a file in Anki's media folder and returns the actual stored name, which may differ from the requested name, so you can reference it correctly in notes without overwriting existing files.

Instructions

Stores a file in Anki's media folder and returns the name Anki stored it under, which can differ from the requested name. Always use the returned NAME: put <img src="NAME"> (images) or [sound:NAME] (audio/video) into a note field. Never overwrites an existing file. To attach media while creating or updating a note, prefer the picture/audio/video params of add_note, add_notes and update_note_fields. source may be "clipboard" for the image the user just copied or pasted.

Input Schema

NameRequiredDescriptionDefault
sourceYesWhere the file comes from: an http(s) URL (Anki downloads it); an absolute path on the computer running Anki (Anki reads it); "clipboard" for the image currently copied on the computer running this server, e.g. a screenshot the user just pasted into the chat; or a base64 data URL ("data:image/png;base64,..."), only for base64 you already have from another tool. Never try to write out the bytes of an image you can only see.
filenameNoName to store the file under in the Anki media folder. Defaults to the last segment of a URL or path, or "pasted-<hash>.<ext>" for clipboard and data URLs. Anki may still rename it; the actual name is what gets used.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv3.0.0

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=false, destructiveHint=false, and idempotentHint=true; the description adds real context beyond them by stating 'Never overwrites an existing file' and that the stored name may be renamed. It also specifies the exact follow-up syntax (`<img src="NAME">`, `[sound:NAME]`), which is behavior an agent cannot infer from structured fields. Minor gap: no mention of size/type limits or failure modes.

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 what it does and the returned-name caveat, then the usage guidance, in a compact sequence with no filler. It is dense but each sentence carries either routing or behavioral information; the imperative 'Never try to write out the bytes...' style is efficient rather than verbose.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/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 return-value burden and does so fully: it explains that the returned NAME may differ and must be used verbatim, and shows the exact embedding syntax for images and audio. For a two-parameter write tool with full annotation coverage, nothing an agent needs is missing.

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 coverage is 100%, and the schema descriptions already enumerate URL, absolute path, clipboard, and base64 data URL forms plus filename defaulting rules. The description only restates the clipboard option, so it adds little beyond the schema; baseline 3 applies.

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?

States a specific verb and resource ('Stores a file in Anki's media folder') plus the return semantics ('returns the name Anki stored it under, which can differ'). It is clearly distinguishable from siblings like retrieve_media_file, get_media_files_names, and add_note, which is named explicitly.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives explicit routing: prefer the `picture`/`audio`/`video` params of add_note, add_notes, and update_note_fields when attaching media to a note, implying this tool is for standalone storage. It also documents the `source` = "clipboard" case for just-copied/pasted images, so when-to-use and when-not-to-use are both covered.

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