Skip to main content

Read

read handles workspace file access. It is the basic builtin tool for inspecting local text and image files.

The current default builtin registry does not register a separate write tool. For local automation that creates or changes files, use exec or process with an appropriate script or command, and inspect the result with read.

read

read supports text and image files:

  • text: reads by line, supports offset and limit
  • images: supports png, jpeg, gif, webp
  • large images: auto-resized when tools.read.auto_resize_images=true

Default text truncation rules:

  • up to 2000 lines
  • up to 50KB

If the limit is reached, the result will include the offset to use for continued reading.

Path resolution

  • read resolves relative paths to its configured cwd
  • if tools.read.cwd is omitted, runtime falls back to the workspace path derived from the local config root
  • large images can be resized automatically with tools.read.auto_resize_images=true

Examples

Read first 200 lines:

{ "tool": "read", "path": "README.md", "limit": 200 }

Continue from line 201:

{ "tool": "read", "path": "README.md", "offset": 201, "limit": 200 }
  • Exec for generating or processing files
  • Process for longer-running local automation