Skip to main content
Glama
Anki Connect MCP Server

Anki Connect MCP Server

Delete media file

delete_media_file
DestructiveIdempotent

Moves a file from Anki's media folder to the trash, so referenced cards show broken images or no audio. Confirm with the user before deleting files notes may use.

Instructions

Moves a file from Anki's media folder to the trash. Cards that still reference it show a broken image or play nothing. Confirm with the user before deleting a file that notes may use. Returns null.

Input Schema

NameRequiredDescriptionDefault
filenameYesFile name in the media folder.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv3.0.0

TDQS

A4/5.0
Behavior4/5

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

Annotations already declare destructiveHint=true and idempotentHint=true, so the description earns credit for going further: it clarifies that the file goes to the trash (implying recoverability), describes the user-visible consequence on cards, and states the return value. It omits edge behavior such as what happens when the filename does not exist or whether an error is raised.

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?

Three short sentences, front-loaded with the actual behavior, then consequence, then the confirmation rule and return value. Every sentence adds information and none repeats the title or annotations.

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?

For a one-parameter destructive tool with no output schema, the description covers what it does, the side effect, the safety check, and the null return. The only missing piece is failure behavior for a nonexistent filename, a minor but real gap.

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 single parameter already carries a description ('File name in the media folder'), so the schema does the heavy lifting. The phrase 'a file that notes may use' hints at the referential relationship but adds no format, path, or extension detail beyond the schema.

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 gives a specific verb and resource ('Moves a file from Anki's media folder to the trash'), which is far more precise than the title's bare 'Delete'. It is implicitly distinguishable from siblings like store_media_file and retrieve_media_file, but it never names them explicitly, so it stops short of full sibling differentiation.

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?

It supplies a real usage precondition: 'Confirm with the user before deleting a file that notes may use,' which tells the agent when to pause and check rather than fire immediately. It offers no explicit when-not guidance or named alternative (e.g. checking get_media_files_names first), which keeps it below a 5.

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