read_workspace
Read a line range from a UTF-8 workspace file and return content, SHA-256, start line, and total lines. Use it to inspect files safely before passing the hash to write operations.
Instructions
Read a window of one UTF-8 text file and return its content, the file's sha256, start_line and total_lines. Read-only. Files over 2 MB and non-UTF-8 files are refused; credentials are redacted (redacted=true) and managed metadata is excluded. Keep the sha256 to pass as expected_sha256 to write_task_file. To find files use list_workspace; to get only a hash use get_source_reference.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | File path relative to the root, for example 'src/app.py'. | |
| root_id | No | Which root to read: 'project' (the registered repository), 'worktree' (a task's recorded worktree, needs execution_id) or the id of a read root the operator granted. | project |
| max_lines | No | Maximum lines to return, from 1 to 600. | |
| project_id | Yes | Registered project id, as returned by list_projects. | |
| start_line | No | First line to return, counting from 1. | |
| execution_id | No | Execution id whose recorded worktree to read. Required when root_id is 'worktree'; ignored for other roots. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||