Find Files
find_filesLocate files by glob pattern with pagination, sorting, metadata, and filtering for hidden or ignored items.
Instructions
Find files matching a glob pattern. Returns matched paths with optional metadata. Pagination cursors reference a query-bound snapshot that expires after 60 seconds. For content search use search_text; for bulk regex replacements use replace_text with the same glob.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | No | Base directory to search under (default: first allowed root) | |
| cursor | No | Opaque pagination cursor; pass unchanged for the next page. Pages slice one snapshot taken on the first call; it expires after ~60s — re-request without a cursor if rejected. | |
| sortBy | No | Sort order: path = full path (default), name = basename only | path |
| pattern | Yes | Glob pattern to match file paths (e.g. **/*.ts, src/**/*.js) | |
| maxDepth | No | Max directory depth to scan; 0 = base directory only, omit for unlimited | |
| maxResults | No | Maximum number of matching files to return per page | |
| includeHidden | No | Include hidden items (starting with .) | |
| includeIgnored | No | Include ignored items (node_modules, .git, etc). |