read_file_version
Read a document's text at an earlier Overleaf project version by version or label to inspect history without modifying the project.
Instructions
Read the text a document held at an earlier project version, from Overleaf's history; nothing changes. Pass version (from monitor_project_history: an update's toVersion is the version after it, its fromVersion the one before) or labelId (a label from monitor_project_history or manage_history). filePath is the path the document had at that version. Returns filePath, version, content (LF-normalized), and newline "LF", with no revision: to put the text back, use manage_history restore_file, or write it with write_file against a fresh read_file revision. A path the version lacks, or an unknown labelId, is NOT_FOUND; a binary file is INVALID_ARGUMENT with details.kind binary_file, and a version past the current one INVALID_ARGUMENT with details.kind version_ahead.
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": {
"projectId": "<projectId>",
"filePath": "<filePath>"
},
"name": "read_file_version"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| labelId | No | Label whose version to read; or pass version | |
| version | No | Project version to read; or pass labelId | |
| filePath | Yes | Project-relative path using forward slashes | |
| projectId | Yes | Overleaf project ID |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| content | Yes | ||
| newline | Yes | ||
| version | Yes | ||
| filePath | Yes |