# slice_read_response

> **Function** in `deepagents`

📖 [View in docs](https://reference.langchain.com/python/deepagents/backends/utils/slice_read_response)

Slice file data to the requested line range without formatting.

Returns raw text for the requested window. Line-number formatting
is applied downstream by the middleware layer.

## Signature

```python
slice_read_response(
    file_data: FileData,
    offset: int,
    limit: int,
) -> str | ReadResult
```

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `file_data` | `FileData` | Yes | FileData dict. |
| `offset` | `int` | Yes | Line offset (0-indexed). |
| `limit` | `int` | Yes | Maximum number of lines. |

## Returns

`str | ReadResult`

Raw sliced content string on success, or `ReadResult` with

---

[View source on GitHub](https://github.com/langchain-ai/deepagents/blob/b710a69b12e49479045eaa54dfb709326473500b/libs/deepagents/deepagents/backends/utils.py#L265)