read_file
Reads any source file from a repository without shell access, using repo-relative paths with optional line offsets and limits for paginated code inspection.
Instructions
Read an arbitrary source file from a repository without shelling out.
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": {
"repo": "<repo>",
"path": "<path>"
},
"name": "read_file"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | Repo-relative file path, e.g. src/ir/pass_manager.py or python/pypto/ir/ops.py | |
| repo | Yes | Repository name from list_repositories(), e.g. "pypto" | |
| offset | No | Zero-indexed line to start reading from (for pagination) | |
| max_lines | No | Maximum lines to return (1–2000) |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||