filtered_read
Reduce token usage when reading files by collapsing non-essential content. Choose full, signatures, or relevant mode to filter blanks, licenses, imports, or focus on specific patterns.
Instructions
Read a file with intelligent reduction. Modes: "full" (collapses blanks, licenses, imports), "signatures" (extracts declarations only), "relevant" (focus pattern with ±10 lines context).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | No | Reading mode: full (optimized), signatures (declarations only), or relevant (focus-based) | |
| path | Yes | Absolute or relative path to the file to read | |
| focus | No | Pattern to search for in relevant mode (string or regex) | |
| end_line | No | End line number (1-based, inclusive) for partial reads | |
| start_line | No | Start line number (1-based) for partial reads |