read_file_lines
Read a specified range of lines from a file, or find lines around a search pattern with configurable context.
Instructions
Read specific line ranges from a file
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": {
"filePath": "<filePath>",
"projectRoot": "<projectRoot>"
},
"name": "read_file_lines"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| filePath | Yes | Absolute path to file | |
| projectRoot | Yes | Project root for security boundary | |
| startLine | No | Starting line number (1-indexed) | |
| endLine | No | Ending line number (1-indexed) | |
| aroundPattern | No | Search pattern to find and return surrounding lines | |
| contextLines | No | Number of lines before/after pattern (default: 5) |