read_file
Reads the contents of text files from local, Remote-SSH, WSL, or container paths, with optional line ranges and byte offsets for bounded access.
Instructions
Read the contents of a text file (supports both Local paths and Remote-SSH/WSL/Container paths in VS Code). Each read returns at most 800 lines or 46080 bytes.
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 | The absolute path of the file to read. | |
| EndLine | No | End line to read (1-indexed, inclusive). Omit to read up to 800 lines. | |
| StartLine | No | Start line to read (1-indexed, inclusive). Omit to read from the beginning. | |
| ByteOffset | No | Byte offset into the line range when truncated by the byte limit. |