code_files
code_files returns every file that has been indexed into the project graph. Use it to explore the codebase structure or find files matching a path pattern.
code_files()code_files(path="src/services", language="TypeScript")code_files(offset=50, limit=50)Parameters
Section titled “Parameters”| Parameter | Type | Default | Description |
|---|---|---|---|
path | string | — | Filter by path substring |
language | string | — | Filter by language (e.g. TypeScript, Python, Rust) |
offset | number | 0 | Skip first N files (for pagination) |
limit | number | 50 | Max files to return |
fast | boolean | true | Use index cache for instant results |
Pagination
Section titled “Pagination”For large projects, paginate to avoid flooding context:
code_files(offset=0, limit=50) → files 1–50code_files(offset=50, limit=50) → files 51–100When to use
Section titled “When to use”- Get a high-level list of what files exist in a directory
- Find all files in a specific language
- Confirm a file was indexed before calling
code_get