Skip to main content
Glama

find_files

Recursively search a root directory for files matching a wildcard pattern while automatically skipping node_modules, build, dist, temp, library, backup, and .git folders.

Instructions

Recursively search for files by wildcard pattern using pure Node.js. Automatically excludes library/, temp/, node_modules/, build/, dist/, _backup/, and .git/.

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": {
      "rootDir": "<rootDir>"
    },
    "name": "find_files"
  }
}

Input Schema

NameRequiredDescriptionDefault
patternNo*
rootDirYesAbsolute root directory to search
maxResultsNo
excludeDirsNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3/5.0
Behavior3/5

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

No annotations are supplied, so the description carries the full disclosure burden. It usefully reveals the default exclusion set (library/, temp/, node_modules/, build/, dist/, _backup/, .git/), which is real behavioral context, but says nothing about symlink handling, permission errors, or whether maxResults truncation is reported.

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?

Two tight sentences with zero waste: the core behavior is front-loaded and the default exclusions follow immediately. Nothing could be cut without losing information.

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

Completeness2/5

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

With no output schema, no annotations, and three of four parameters undocumented, the definition does not tell the agent what a result looks like (paths only? matches? truncated flag?). For a recursive search over potentially large trees, truncation and error behavior are material omissions.

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

Parameters2/5

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

Schema description coverage is only 25% — just rootDir is documented — and the description does not compensate. Wildcard syntax for 'pattern', the meaning of 'excludeDirs' relative to the built-in exclusion list, and maxResults truncation behavior are all left ambiguous.

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?

States a specific verb and resource ('Recursively search for files by wildcard pattern'), plus the implementation detail 'pure Node.js'. This clearly separates it from directory listing or content search siblings, though it never names an alternative explicitly.

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?

There is no when-to-use guidance relative to obvious neighbors like list_dir, grep_search, or fs_manage. The automatic directory exclusions hint at the intended scope, but the agent must infer that this tool is for name-based recursion rather than listing or content matching.

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