Find Files
find_filesSearch and locate files across directory trees using glob patterns. Skips .git and node_modules to return matching paths with sizes.
Instructions
Find files by name across a directory tree using a glob pattern. Use this instead of walking directories one list_directory call at a time. Skips .git and node_modules.
Args:
path (string): Root directory to search (default ".").
pattern (string): Glob, e.g. ".pdf", "**/.test.ts", "config". Matched against the path relative to root.
max_results (number): Max files returned (default 100).
Returns matching paths with sizes.
Example: { "path": "~/Documents", "pattern": "*.pdf" }
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | No | Root directory | . |
| pattern | Yes | Glob pattern, e.g. **/*.ts | |
| max_results | No | Max files returned |