Files
workbench__read_file
Reads a text file from the project directory.
- Paths outside the project directory are refused.
- Use
offsetandlimitto page through large files.
| Available to | Effect |
|---|---|
| Workbench agents only | Read-only |
Input
limitinteger
Maximum lines to return. Default 500, cap 2000.
offsetinteger
1-based line to start from. Default 1.
File path, relative to the project directory (or absolute within it).
Output
contentstring
linesReturnedinteger
offsetinteger
pathstring
totalLinesinteger
truncatedboolean
{
"content": "fn main() {\n …\n}\n",
"linesReturned": 312,
"offset": 1,
"path": "src/main.rs",
"totalLines": 312,
"truncated": false
}