read_file
Reads a text document as LF-normalized content and returns its revision token for use in write operations, letting you edit Overleaf files safely.
Instructions
Read a text document as LF-normalized content and return its opaque revision. Returns content, revision (pass it unchanged to write_file or write_section), newline "LF", protocol ("sharejs" or "history-ot"), and trackChangesActive.
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"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| filePath | Yes | Project-relative path using forward slashes | |
| projectId | Yes | Overleaf project ID |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| content | Yes | ||
| newline | Yes | ||
| protocol | Yes | ||
| revision | Yes | ||
| trackChangesActive | Yes |