Read the project's history
read_historyReads a project's Git history to list commits, show diffs, or blame lines, so you can find who changed a file, when it changed, and which revision hash to restore or diff.
Instructions
Read the history Overleaf's Git bridge has recorded for a project, plus anything pushed from here; view picks what. commits, the default, lists commits newest first, with date, author, message and the files each one changed. Use it to find out who changed a file and when, or to find a revision for read_file, manage_files (action restore) or the diff view, which take the short hash it prints. diff shows what changed from fromRevision to toRevision, or to Overleaf's latest fetched version when toRevision is omitted; read_project (view changes) shows local edits not yet pushed instead. path narrows commits and diff to one file or directory. blame lists each line of the file at path, or of startLine to endLine, after the short hash, date and author of the commit that last changed it, then those commits with their messages; a line edited here and not committed yet is marked not committed yet. Blame follows the file through renames and refuses a binary file or one that has no commit yet. commits and blame pull from Overleaf first, so the newest commits are included, and fail, keeping local work, if that pull conflicts with it; diff does not pull and compares against Overleaf as last fetched. A diff missing fromRevision, a blame missing path, or a revision that is not a commit hash, is refused before Git runs. Returns at most limit commits, so narrow with path, since and until rather than raising limit far; a diff or blame is cut off after 60,000 characters, so blame a long file in line ranges.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "read_history"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | No | commits and diff: only this file or directory, relative to the project root; omit for the whole project. blame, required: the file to blame. | |
| view | No | What to read (default "commits"): commits (the log, newest first), diff (what changed between two revisions) or blame (who last changed each line of one file). | commits |
| limit | No | commits view only: most commits to return, 1 to 200 (default 20). | |
| since | No | commits view only: commits on or after this date, for example 2026-11-01 or 2 weeks ago. | |
| until | No | commits view only: commits on or before this date, in the same forms as since. | |
| endLine | No | blame view only: last line to blame, inclusive. Omit to blame to the end; a value past the end stops there. | |
| project | No | Which project to use: its Overleaf address, its 24-character id, or a registered project name. Omit to use the default project. | |
| startLine | No | blame view only: first line to blame, 1-indexed. Omit to start at line 1. | |
| toRevision | No | diff view only: the commit hash to compare to. Omit for Overleaf's latest fetched version. | |
| fromRevision | No | diff view, required: the commit hash to compare from, as the commits view prints it. |