Read file
read_fileRead a file's text content with optional line range. Returns line-numbered content and total line count.
Instructions
Read the text content of a file under the root. Optionally scope to a 1-indexed, inclusive line range via startLine/endLine. Returns the content with 1-indexed line numbers prefixed, plus the file's total line count.
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 | File path relative to root | |
| endLine | No | 1-indexed end line, inclusive. Defaults to end of file | |
| startLine | No | 1-indexed start line, inclusive. Defaults to 1 |