Skip to main content
Glama
axross-headless-mcp

axross-headless-mcp

Identify file types in a folder

scan_file_types
Read-onlyIdempotent

Identify the content type of every file in a folder and flag misleading extensions. Use it to audit for disguised files, optionally listing only content-extension mismatches.

Instructions

Identify the content type of every file under a folder and flag misleading extensions. Use when: auditing a folder for disguised files (mismatches_only=true). Instead: identify_file_type for one file; walk_tree for names only. Requires: --mcp-tools filetype. Behavior: read-only, breadth-first, name order; symlinks are skipped. max_files, or a folder below subfolder_levels, sets truncated. Unlistable folders and secret files go to unreadable. Time limit: 5 min. Returns: {path, files_scanned, truncated, complete, unreadable (paths), entries: [identify_file_type records]}; mismatches_only lists verdict=mismatch only.

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_file_types"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathNoThe folder to scan (absolute, or relative to the MCP root). Required unless path_b64 is given.
backendNoBackend id from list_backends; omit for the default.
path_b64Nopath as base64 of its raw bytes, for non-UTF-8 names; replaces path.
max_bytesNoBytes read from the start of each file for the content check (64 KiB default, at most 1 MiB).
max_filesNoStop after identifying this many files; more sets truncated=true.
mismatches_onlyNoList only files whose content contradicts their extension.
subfolder_levelsNoSubfolder levels, counted from 0: 0 = path's own files, 1 = also its subfolders'.
use_file_commandNoAlso run the file(1) command for its description (file_command); local regular files only, ignored on remote backends.

Output Schema

NameRequiredDescriptionDefault
pathYes
entriesYes
completeYes
truncatedYes
unreadableNo
files_scannedYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.15.181

TDQS

A4.9/5.0
Behavior5/5

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

Annotations already cover read-only/idempotent/non-destructive, yet the description still adds substantial behavior: breadth-first name-ordered traversal, symlinks skipped, truncation triggers via max_files or subfolder_levels, unlistable folders and secret files routed to 'unreadable', and a 5-minute time limit. These are the operational details an agent needs to interpret partial results.

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?

Labelled, front-loaded clauses (Use when / Instead / Requires / Behavior / Returns) with no filler; the telegraphic style is dense but scannable and every clause carries distinct information.

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?

An 8-parameter tool with an output schema; the description summarizes the return shape and explains how mismatches_only narrows the entries, so nothing essential is left for the agent to guess. Truncation and error-bucket semantics are both covered.

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 100%, so the baseline is 3, but the description adds consequence-level meaning the schema does not state: max_files or a folder below subfolder_levels sets truncated, and mismatches_only restricts output to verdict=mismatch. It leaves max_bytes, backend, and use_file_command unmentioned, though those are self-documented.

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 ('identify the content type of every file under a folder') plus the distinctive secondary behavior ('flag misleading extensions'). It explicitly contrasts itself with identify_file_type (single file) and walk_tree (names only), so an agent can pick among siblings without opening schemas.

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?

Uses explicit 'Use when' (disguised-file audit with mismatches_only=true), 'Instead' alternatives naming two concrete siblings, and a prerequisite ('Requires: --mcp-tools filetype'). This covers when to use, when to prefer something else, and activation requirements.

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