Skip to main content
Glama

find_files

Read-only

Search a directory tree recursively by glob pattern to locate files by name, returning newest-first matches with size and modification time while honoring ignore rules.

Instructions

Find files by name across a directory tree.

Walks the directory recursively and returns files whose names match the
glob pattern, newest-first, with size and modification time. Honors
nested .gitignore/.ignore rules (respect_gitignore=false to disable) and
never reads file contents.

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

Input Schema

NameRequiredDescriptionDefault
fuzzyNoEnable fuzzy name matching for typo'd file names (null = false; e.g. 'confg.py' finds 'config.py').
patternYesfnmatch glob matched against file names (e.g. '*.log', 'config*.py').
max_depthNoHow many levels deep to recurse (default: unbounded, hard-capped by server config).
max_resultsNoMaximum files returned (1-500). Defaults to server config (100).
include_hiddenNoInclude dot-files and dot-dirs (default: false).
absolute_dir_pathYesThe absolute path to the directory to search.
respect_gitignoreNoHonor nested .gitignore/.ignore files when filtering (default: server default, true). Set false to find ignored files too.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv1.0.0

TDQS

A3.8/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true and destructiveHint=false, yet the description still adds real behavior: recursive walk, newest-first ordering, size and mtime in results, and .gitignore/.ignore honoring with a respect_gitignore=false escape hatch. It stops short of covering symlink handling, error behavior on missing paths, or performance characteristics of an unbounded walk.

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?

Three short sentences, front-loaded with purpose, then ordering/return fields, then filtering rules and the read-only boundary. No filler or restated title.

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

Completeness4/5

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

With no output schema, the description correctly tells the agent what comes back (names, size, modification time, newest-first) and what filtering applies. Edge cases like nonexistent directories, permission failures, and symlink traversal are unaddressed, but the core contract is complete.

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 seven parameters are already documented with examples and defaults. The description only reinforces respect_gitignore semantics and the glob nature of pattern, adding little beyond the schema; baseline 3 applies.

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 ("Find files by name across a directory tree") and pins the mechanism to glob name matching, which separates it from content-search siblings. It never names list_directory or search_directory directly, so differentiation is implied through "never reads file contents" rather than stated.

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?

Usage is implied: use it when you know a filename pattern and want recursive matching. There is no explicit guidance on when to prefer list_directory or search_directory over this tool, and no stated preconditions such as the path needing to exist.

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