Read a project as a whole
read_projectRead an Overleaf project through overview, files, outline, status, changes, and word_count views to orient, audit work, and preview changes before pushing.
Instructions
Read one project as a whole; view picks what. overview, the default, orients at the start of a task: the absolute path of the local Git clone this server edits, the likely main document and its section count, file counts by kind, and local work not yet pushed. files lists every path grouped by kind (LaTeX sources, bibliographies, figures, other), including files sparse checkout keeps off disk. outline lists the sectioning commands of path, or of the likely main document, with nesting and line ranges, following \input and \include into the files it includes; commented-out headings are skipped. status reports the clone against Overleaf: branch and head, commits just pulled, local commits not yet pushed, files edited but not committed, and the last ten commits. changes shows the unified diff push_changes would publish: uncommitted edits, new and deleted files, and commits left behind by a refused push. word_count runs texcount in the clone, with the flags of Overleaf's Word Count menu, on path or the likely main document and the files it includes, edits not yet pushed included: words in text, in headings and outside text such as captions, how many headings, floats and math expressions there are, and words in text per file. It needs texcount, which comes with TeX Live and MacTeX. Use read_file for one file's text, search_project to find which file mentions something, and read_history for older versions. The likely main document is a guess (main.tex, paper.tex, manuscript.tex, root.tex, thesis.tex or article.tex at the root, otherwise the shallowest .tex file), and the reply says when it has no \begin{document}. Every view except changes pulls from Overleaf first; if that pull conflicts with unpushed local work, the call fails and keeps the work, except in status, which reports the conflict as a WARNING. changes does not pull, so it compares against Overleaf as last fetched. project can name any project the default token reaches, registered or not; the first call on a project clones it, so it is slower than later calls. Returns plain text, cut off after 60,000 characters; "No local changes pending." means there is nothing to push.
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_project"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | No | outline view: the .tex file to outline, relative to the project root, default the likely main document. changes view: only this file or directory, default the whole project. word_count view: the .tex file to count, with the files it includes, default the likely main document. | |
| view | No | What to read (default "overview"): overview (where to start), files (every path by kind), outline (sectioning commands), status (commits against Overleaf), changes (the diff push_changes would publish) or word_count (texcount on the clone). | overview |
| project | No | Which project to use: its Overleaf address, its 24-character id, or a registered project name. Omit to use the default project. | |
| extension | No | files view only: keep paths ending in this extension, case-insensitively, e.g. tex or .bib. Omit to list all kinds. | |
| followIncludes | No | outline view only: follow \input, \include, \subfile and \import from path, giving the whole document in reading order with each heading's own file and line numbers (default true); false lists only path's own headings. | |
| includeUntracked | No | files view only: also list files created locally and not yet pushed to Overleaf, marked (untracked), excluding ignored build artifacts (default false). |