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

media.getDirectory

media_getDirectory
Read-only

Returns the local directory path for the active Anki collection’s media files, so you can locate and manage media assets.

Instructions

Return the local active collection media directory.

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

Possible errors: collectionUnavailable, internalError, invalidParams, 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": "media_getDirectory"
  }
}

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.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.5/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, destructiveHint, and openWorldHint, but the description usefully adds scope, effect, completion status, undo behavior, and the exact possible errors including staleSession. It still does not describe the return format or whether the directory is guaranteed to exist.

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 description is short and front-loads the return value before structured metadata lines. The Anki-Connect method name is slightly redundant with the tool name, but the effect, completion, undo, and error lines are compact and earn their place.

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 simple read-only tool with one optional, fully documented parameter and annotations covering safety, the description is nearly complete. The main remaining gap is that no output schema exists and the return value format is only implied by 'media directory'.

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?

The single optional session parameter has 100% schema description coverage, and its schema text already explains staleSession behavior and when to omit it. The description adds no parameter-specific meaning beyond 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: return the local active collection media directory. It is clear enough to distinguish from media mutation siblings like media_store and media_delete, though it does not explicitly contrast with media_list or media_get.

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

Usage Guidelines2/5

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

The description gives scope and effect but no explicit when-to-use guidance. It does not say when to call this instead of media_list, media_get, or collection_get, so an agent must infer the use case.

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