Skip to main content
Glama

search_files

Locate files and directories by glob, regex name, size, age, or type without shelling out to find; get consistent cross-platform results, sortable by path, size, or mtime.

Instructions

Find files and directories by name glob, size, age or type — the find you would otherwise shell out for, with consistent output on every platform. Sorts by path, size or mtime.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
globNoOnly these paths, as globs: ["*.ts","src/**/*.js"]. A pattern without "/" matches the basename at any depth.
nameNoRegex on the file name (alternative to glob).
pathNoFile or directory to search. Default: server cwd.
sortNoOrdering. size and mtime sort descending.
typeNoWhat to return. Default file.
limitNoMax entries returned. Default 300.
detailsNoInclude size and mtime. Default true.
excludeNoGlobs to skip.
max_sizeNoOnly entries at most this many bytes.
min_sizeNoOnly entries at least this many bytes.
max_bytesNoByte cap on the returned text. Lower it to save tokens.
max_depthNoRecursion depth. Default 24.
skip_dirsNoDirectory names not to enter.
show_hiddenNoInclude dotfiles.
respect_gitignoreNoHonour .gitignore. Default true.
modified_before_hoursNoOnly entries untouched for at least N hours.
modified_within_hoursNoOnly entries touched in the last N hours.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.7/5.0
Behavior3/5

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

With no annotations, the description carries the full burden; it usefully discloses cross-platform consistent output and default sort direction, which goes beyond the bare name. However, it never confirms this is a read-only/non-mutating operation, nor mentions traversal safety, performance, or output shape for a 17-param tool.

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?

A single tight sentence with zero filler that front-loads the verb and resource before the differentiator and sort options. Nothing is wasted.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 17-parameter tool with no annotations and no output schema, the description is thin — it says nothing about return values or how the many filtering parameters interact. The rich schema compensates somewhat, but the description stops at minimum viability.

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 the schema fully documents all 17 parameters, making the baseline 3 appropriate. The description's mention of sorting by path/size/mtime merely restates what the schema already provides and adds no new parameter meaning.

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 (Find) and resource (files and directories) with the full dimension set (name glob, size, age, type). The phrase 'the find you would otherwise shell out for' implicitly distinguishes it from shell_exec/shell_bulk, while the file-oriented framing separates it from the content-oriented search_text sibling.

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?

The 'instead of shelling out for find' line implies usage but never states explicit when-to-use vs the shell_* or search_text siblings. No exclusions, prerequisites, or decision criteria are given, so routing relies on inference.

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