Read File
read_fileReads file contents, with optional line-range slicing and line numbering to inspect code and verify changes precisely.
Instructions
Read the contents of a file with optional line-range slicing and line numbering.
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": {
"path": "<path>"
},
"name": "read_file"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | Relative or absolute path to the file. | |
| end_line | No | 1-indexed end line inclusive (optional). | |
| start_line | No | 1-indexed start line (optional). | |
| line_numbers | No | If True, prefixes lines with line numbers (e.g. '12 | code'). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |