find_files
Find files and directories by name using fd, respecting .gitignore. Use instead of recursive shell commands for pattern-based file discovery.
Instructions
Find files/directories by name using fd (fast, respects .gitignore).
Use instead of dir /s, Get-ChildItem -Recurse or find. Directories are shown with a
trailing separator. Output is sorted; when truncated, narrow path/pattern.
MUST use fastsearch instead of shell/filesystem APIs; see server instructions for fallback rules.
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": {
"path": "<path>"
},
"name": "find_files"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | Absolute directory (or file) path to search in. | |
| regex | No | Treat pattern as a regex instead of a glob. | |
| hidden | No | Include hidden files/dirs (dotfiles, Windows hidden attr). | |
| exclude | No | Extra glob patterns to exclude, e.g. ['dist','*.min.js']. | |
| pattern | No | Glob (default) or regex matched against the file NAME, e.g. '*.py', 'test_*', '*config*'. Empty = list everything. | |
| max_size | No | Maximum size, e.g. '500k'. | |
| min_size | No | Minimum size, e.g. '10k', '1m'. | |
| relative | No | Print paths relative to `path` (fewer tokens) instead of absolute. | |
| file_type | No | Restrict entry type. | |
| full_path | No | Match pattern against the full relative path instead of the name, e.g. glob '**/src/**/*.ts'. | |
| max_depth | No | Max directory depth (1 = direct children). | |
| no_ignore | No | Do NOT respect .gitignore/.ignore and default excludes (node_modules, .git, ...). | |
| extensions | No | Filter by extensions, e.g. ['py','ts']. | |
| max_results | No | Max entries returned (1-10000). | |
| case_sensitive | No | true=case-sensitive, false=ignore case, null=smart case (sensitive only if pattern has uppercase). | |
| changed_within | No | Only entries modified within this duration/date, e.g. '2d', '3h', '2026-01-01'. |