Read a file inside the project directory.
read_fileRead a file's contents with line numbers. Specify start and end lines to view specific sections without truncation.
Instructions
To read the contents of a file with line numbers. Returns numbered lines. For large files, output is truncated to head+tail unless a specific range is given via start_line/end_line (1-based, inclusive).
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>"
},
"name": "read_file"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| end_line | No | ||
| filepath | Yes | ||
| start_line | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |