Find where something is in many/huge files
locate_in_filesFind the files and line ranges most likely containing a bug's cause, a feature's implementation, or a setting definition by describing symptoms or code behavior.
Instructions
Find which files and lines most likely contain what you describe — the cause of a bug from its symptoms, the code implementing a feature, where a setting is defined. Pass 1: every file is split into chunks and ALL chunks are scored by the decision model (nothing is truncated; very cheap even for megabytes). Pass 2: the best chunks are re-scored in small line windows to pinpoint the lines. Returns ranked file:line ranges with probabilities, a per-file ranking and the code of the top locations, so you can go straight to the fix.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| top | No | How many locations and files to list (default 5) | |
| model | No | Override the OpenRouter decision model for this call, e.g. cloudflare/clef (see list_models) | |
| paths | Yes | Files and/or directories to read (absolute or relative to the project root) | |
| query | Yes | What to find, as specific as possible: symptoms, error text, expected vs actual behaviour, names involved | |
| dry_run | No | Only list which files would be scanned and the estimated tokens; no API call | |
| exclude | No | Extra globs to skip, e.g. ["**/*.test.ts"] | |
| include | No | Glob patterns inside directories, e.g. ["**/*.ts", "docs/**/*.md"]. Default: all text files | |
| snippets | No | Include the code of this many top locations, with line numbers (default 3, 0 = only file:line ranges) | |
| chunk_chars | No | Chunk size in chars for pass 1 (default 20000; capped to what the model's context fits) | |
| window_lines | No | Size of the pinpointed line windows (default 40) | |
| respect_gitignore | No | Skip files ignored by the directory's .gitignore (default true) |