read_file
Fetch UTF-8 file contents with line and byte limits, and get the SHA-256 hash to detect concurrent modifications when writing.
Instructions
Read a UTF-8 text file with line and byte limits. Returns the file SHA-256; pass it back as "expected_sha256" when writing to detect concurrent changes.
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 | Path relative to the workspace root, or an allowed absolute path. | |
| max_bytes | No | Maximum UTF-8 bytes to return. | |
| max_lines | No | Maximum lines to return. | |
| start_line | No | First line to return (1-based). | |
| line_numbers | No | Prefix each returned line with its 1-based number and a tab. |