debugbar_read_source
Read a PHP source file and focus on a specific line to inspect the exact code from an exception stack trace or query backtrace.
Instructions
Read a PHP source file from the project, optionally focusing on a specific line. File paths are resolved against PROJECT_ROOT in .env. Pass a file path from an exception stack trace or query backtrace to see the exact code.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"file": "<file>"
},
"name": "debugbar_read_source"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file | Yes | File path (absolute or relative to project root) | |
| full | No | Read the full file instead of a context window. Default: false | |
| line | No | Target line number to focus on | |
| context | No | Lines of context around the target line. Default: 15 |