> ## Documentation Index
> Fetch the complete documentation index at: https://graph.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# 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 to | Effect |
| - | - |
| Workbench agents only | Read-only |

## Input

**limit** `integer`

Maximum lines to return. Default 500, cap 2000.

**offset** `integer`

1-based line to start from. Default 1.

**path** `string` *required*

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

## Output

**content** `string`

**linesReturned** `integer`

**offset** `integer`

**path** `string`

**totalLines** `integer`

**truncated** `boolean`

```json Output theme={null}
{
  "content": "fn main() {\n    …\n}\n",
  "linesReturned": 312,
  "offset": 1,
  "path": "src/main.rs",
  "totalLines": 312,
  "truncated": false
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.