Read file
read_fileRead a UTF-8 text file from a workspace and return its content with line numbers. Use offset and limit to inspect specific line ranges before editing.
Instructions
Read a UTF-8 text file from the workspace and return its content with 1-based line numbers in the form 'N: '. Use this before editing a file, or to inspect specific line ranges with offset/limit. Do not use it for binary files (they are rejected), to search file contents (use grep), or to discover files (use list_files).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | Workspace-relative path of the file to read. Absolute paths inside the workspace are also accepted. | |
| limit | No | Maximum number of lines to return. Defaults to 2000 and is capped at 2000. | |
| offset | No | 1-based line number to start reading from. Defaults to 1. | |
| workspace | No | Workspace name (see workspace_list). Defaults to the primary workspace. |