Read older file version
read_file_versionRead a specific older file version by version_id for inspection or recovery, paging through its bytes like read_file. Use it to restore or examine previous content when the current version is not wanted.
Instructions
Read one older version of a file (from list_file_versions), paged like read_file. Use when: inspecting or recovering an older version. Instead: read_file for the current version. Behavior: read-only. offset, encoding and max_bytes (at most 4 MiB) work as in read_file; each page reads the version from its start, so later pages cost more. Refuses secret files, also by their content. Backends without versions fail. Time limit: 15 s. Returns: as read_file: {content_b64 or text, size, truncated, replaced, offset, next_offset}.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"version_id": "<version_id>"
},
"name": "read_file_version"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | No | The file to read (absolute, or relative to the MCP root). Required unless path_b64 is given. | |
| offset | No | Byte offset to start at; pass the previous call's next_offset. | |
| backend | No | Backend id from list_backends; omit for the default. | |
| encoding | No | base64 (default): the exact bytes. text: decoded as UTF-8, as read_file. | base64 |
| path_b64 | No | path as base64 of its raw bytes, for non-UTF-8 names; replaces path. | |
| max_bytes | No | Most bytes to return; 0 or omitted means the ceiling, 4194304 (4 MiB). | |
| version_id | Yes | The version_id of one entry from list_file_versions for this path. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| size | Yes | bytes read | |
| text | No | the text (encoding=text) | |
| offset | No | ||
| replaced | No | text: undecodable bytes replaced | |
| truncated | Yes | ||
| content_b64 | No | the bytes (encoding=base64) | |
| next_offset | No |