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

media.delete

media_delete
Destructive

Move a media file to Anki's trash without deleting notes, letting you remove unwanted media while preserving card content.

Instructions

Move media to Anki trash without deleting notes.

Anki-Connect method media.delete. Scope: collection. Effect: media. Completion: completed. Undo: none.

Possible errors: collectionUnavailable, internalError, invalidParams, 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": {
      "filename": "<filename>"
    },
    "name": "media_delete"
  }
}

Input Schema

NameRequiredDescriptionDefault
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.
filenameYesMedia file basename to move to Anki's trash.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4/5.0
Behavior4/5

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

Goes well beyond destructiveHint=true by disclosing trash semantics (a move, not an erase), the no-undo guarantee, collection scope, and an enumerated set of failure codes including staleSession and notFound. It stops short of saying whether items can be recovered from trash or how filenames are resolved.

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?

Purpose is front-loaded in the first sentence, followed by a compact structured contract (method, scope, effect, completion, undo, errors). No sentence is wasted and the fixed ordering makes the key facts scannable.

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 two-parameter destructive tool with annotations and no output schema, the definition covers effect, undo, scope, and error surface well. The only meaningful omission is what the response returns and whether trash contents can be restored.

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 session parameter is documented at length in the schema, so the schema carries the load. The description adds no parameter-level meaning beyond what is already structured, making the baseline 3 correct.

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 ("Move media to Anki trash") plus a crucial scope boundary ("without deleting notes"), which separates it from notes_delete and the other media_* siblings. An agent can identify the operation without opening the schema.

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?

Implied usage is clear — remove a media file that is no longer referenced — and "Undo: none" is a useful precondition warning. However, it never explicitly states when to prefer this over media_store or notes_delete, nor what happens if the file is still referenced by a note.

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