Skip to main content
Glama
axross-headless-mcp

axross-headless-mcp

Scan for duplicates

scan_duplicates

Hash every file under a folder into the duplicate-finder index to prepare duplicate detection and cleanup.

Instructions

Run a duplicate scan: hash every file under a folder into the Duplicate Finder's index. Use when: before list_duplicate_groups or trash_duplicates, or after changes. Instead: list_duplicate_scans for past scans; compute_file_checksum for one file. Requires: --mcp-tools duplicates. Behavior: writes index rows, never files. path must be a folder. Each run adds a scan record. Symlinks, the axross trash and secret files are skipped; unchanged files are not hashed again unless rehash. Remote backends use their own checksum (ETag-only ones index nothing). Time limit: 30 min. Returns: {scan_id, root, backend_id, algorithm, files_indexed, status (complete|cancelled|failed), truncated (max_files), complete (no cap, no unreadable folder), unreadable (folder paths)}.

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": "scan_duplicates"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathNoThe folder (absolute, or relative to the MCP root). Default on the local backend: the MCP root; other backends need it.
rehashNoHash every file again, even when size and mtime are unchanged.
backendNoBackend id from list_backends; omit for the default.
path_b64Nopath as base64 of its raw bytes, for non-UTF-8 names; replaces path.
algorithmNoHash algorithm asked of the backend; a remote backend may answer with its own (e.g. md5), and the rows and the result carry the one used.sha256
max_filesNoVisit at most this many entries (files and folders together); reaching it stops the walk and sets truncated=true. Default 1,000,000 on the local backend, 100,000 on a remote one.

Output Schema

NameRequiredDescriptionDefault
rootYes
statusYes
scan_idYes
completeYes
algorithmYes
truncatedYes
backend_idYes
unreadableNo
files_indexedYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.15.181

TDQS

A4.8/5.0
Behavior5/5

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

Far beyond the annotations, it discloses that index rows are written but no files are touched, that each run appends a scan record, that symlinks/trash/secret files are skipped, that unchanged files are not re-hashed without rehash, that ETag-only remote backends index nothing, and that runs are capped at 30 minutes.

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?

Labeled clauses (Use when / Instead / Requires / Behavior / Returns) make it front-loaded and scannable despite its length. The Returns line partly restates the existing output schema, so a little space is not fully earned.

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?

For a six-parameter, open-world, non-idempotent indexing tool, the description covers prerequisites, side effects, skip rules, limits, and failure/truncation semantics — nothing an agent needs in order to call it correctly is missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is already 100%, yet the description adds real meaning: path must be a folder, unchanged files are skipped unless rehash is set, and max_files truncation produces truncated=true. It stops short of explaining the path_b64 override or the backend default interplay, which remains schema-only.

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?

"Run a duplicate scan: hash every file under a folder into the Duplicate Finder's index" names a specific verb, resource, and side effect (index population), and the following note that it never writes files distinguishes it from sibling write tools like trash_duplicates.

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?

It gives explicit ordering guidance ("before list_duplicate_groups or trash_duplicates, or after changes") and names two alternatives with their selecting conditions: list_duplicate_scans for history, compute_file_checksum for a single file.

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