repo.read_file
Read repository files safely with enforced size limits and binary detection, giving AI agents controlled access to code.
Instructions
Read a file from the repository with size and binary guards
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": "repo.read_file"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | File path relative to repo root | |
| max_bytes | No | Max bytes to read (default 1MB, cap 10MB) |