Dive

Files

workbench__read_file

Reads a text file from the project directory.

  • Paths outside the project directory are refused.
  • Use offset and limit to page through large files.
Available toEffect
Workbench agents onlyRead-only

Input

limitinteger

Maximum lines to return. Default 500, cap 2000.

offsetinteger

1-based line to start from. Default 1.

pathstringrequired

File path, relative to the project directory (or absolute within it).

Output

contentstring
offsetinteger
pathstring
totalLinesinteger
truncatedboolean
{
  "content": "fn main() {\n    …\n}\n",
  "linesReturned": 312,
  "offset": 1,
  "path": "src/main.rs",
  "totalLines": 312,
  "truncated": false
}