read_code_context
Reads a Symfony project file, optionally stripping doc and line comments to reduce token usage for faster analysis.
Instructions
Read a file from the Symfony project, with optional comment stripping.
Stripping PHPDoc / block comments (/* ... */) significantly reduces token usage without losing functional information – use strip_doc_comments=true (the default) for faster, cheaper analysis.
Args: file_path: Path relative to the project root. Examples: "src/Controller/UserController.php" "src/Entity/User.php" Absolute paths inside the project are also accepted. strip_doc_comments: Remove /** ... / and / ... */ blocks. Default: true. strip_line_comments: Also remove // single-line comments. Default: false (inline comments are useful context).
Returns the file content with line numbers and a token-savings summary.
Security: only files inside the project root can be read (path traversal is blocked).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file_path | Yes | ||
| strip_doc_comments | No | ||
| strip_line_comments | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |