Skip to main content
Glama

Find duplicate media files

find_duplicate_media_files
Read-onlyIdempotent

Find duplicate media files by identical content in a folder and subfolders, return duplicate groups with wasted bytes, and report storage freed by deleting extra copies without deleting anything.

Instructions

Find files with identical content in a folder (and, by default, its subfolders), whatever their names: files of equal size are compared by MD5 checksum. Returns groups of identical files (largest waste first) with the size of one copy and wasted_bytes, the bytes that deleting the extra copies would free. It only reports; nothing is deleted. Reading large folders can take a while. Works on files on disk; needs neither Premiere Pro nor ffmpeg.

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": {
      "folder": "<folder>"
    },
    "name": "find_duplicate_media_files"
  }
}

Input Schema

NameRequiredDescriptionDefault
kindsNoOnly files of these kinds (decided by extension), e.g. ["video"]. Default: all three.
folderYesAbsolute path of the folder to search.
recursiveNoAlso search subfolders. Default true.
extensionsNoOnly files with these extensions, without the dot, e.g. ["mp4", "mov"]. Default: every known video, audio and image extension.
max_resultsNoMaximum duplicate groups to return. When there are more, the result has truncated=true and the total count. Default 200.
min_size_bytesNoIgnore files smaller than this many bytes. Default 1.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A4.2/5.0
Behavior4/5

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

Beyond the readOnly/destructive/idempotent annotations it discloses the comparison algorithm (size prefilter, then MD5), the performance characteristic of slow large-folder reads, and the absence of external dependencies (no Premiere Pro, no ffmpeg). It also describes result ordering (largest waste first), which annotations cannot convey.

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 the core definition, then layers identity method, return shape, safety, and performance caveat in a logical order. Every sentence carries information, though the enumeration of return fields is slightly dense for a single sentence.

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?

There is no output schema, yet the description supplies the return contract (groups of identical files, size of one copy, wasted_bytes, sort order, truncation implied via max_results in schema) and the operational caveats. For a six-parameter read-only tool this leaves nothing an agent needs unanswered.

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 all six parameters are already documented, including defaults for kinds, recursive, extensions, max_results and min_size_bytes. The description only reinforces the recursive-by-default behavior and clarifies that names do not determine identity; it adds no syntax or format detail beyond the schema.

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 ('Find files with identical content in a folder'), the identity criterion (equal size then MD5, names irrelevant), and the scope (folder and, by default, subfolders). The closing line 'Works on files on disk; needs neither Premiere Pro nor ffmpeg' separates it from the project-item duplicate sibling.

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?

Makes clear when it applies (duplicate detection on disk files, not project items) and states the safety posture ('only reports; nothing is deleted'), plus a caveat that large folders take time. It stops short of explicitly naming an alternative such as find_duplicate_items for in-project duplicates, leaving that routing to inference.

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