Find Files
findFind files by glob pattern (e.g. **/*.ts). Returns matching files with metadata. For content search, use grep. For bulk edits, pass the same glob to search_and_replace.
Instructions
Find files by glob pattern (e.g. **/*.ts). Returns matching files with metadata. For content search, use grep. For bulk edits, pass the same glob to search_and_replace.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | No | Base directory (default: root). Absolute path required if multiple roots. | |
| pattern | Yes | Glob pattern (e.g. "**/*.ts", "src/*.js") | |
| maxResults | No | Max results (1-10000). Default: 100 | |
| includeIgnored | No | Include ignored items (node_modules, etc). | |
| includeHidden | No | Include hidden items (starting with .) | |
| sortBy | No | Sort by path, name, size, or modified | path |
| maxDepth | No | Maximum directory depth to scan | |
| cursor | No | Pagination cursor from a previous response |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| totalMatches | No | Total matches found | |
| truncated | No | Results truncated? | |
| resourceUri | No | Full results URI | |
| ok | Yes | ||
| root | No | Search root | |
| results | No | ||
| filesScanned | No | Files scanned | |
| skippedInaccessible | No | Inaccessible files | |
| stoppedReason | No | Why search stopped | |
| nextCursor | No | Cursor for the next page; absent on the final page |