Skip to main content
Glama

Read a project as a whole

read_project
Read-only

Read 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

NameRequiredDescriptionDefault
pathNooutline 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.
viewNoWhat 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
projectNoWhich project to use: its Overleaf address, its 24-character id, or a registered project name. Omit to use the default project.
extensionNofiles view only: keep paths ending in this extension, case-insensitively, e.g. tex or .bib. Omit to list all kinds.
followIncludesNooutline 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.
includeUntrackedNofiles view only: also list files created locally and not yet pushed to Overleaf, marked (untracked), excluding ignored build artifacts (default false).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.5.0

TDQS

A4.8/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Beyond readOnlyHint/openWorldHint the description discloses the network behavior (every view except changes pulls from Overleaf first), failure semantics (a pull conflicting with unpushed work fails and keeps the work, except status which reports a WARNING), latency (first call clones the project, so it is slower), output limits (plain text truncated at 60,000 chars) and a sentinel return value ('No local changes pending.'). This is exactly the operational context annotations cannot carry.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The material is dense and earns its length for a six-mode tool, and the purpose is front-loaded in the first clause. It is, however, one unbroken paragraph with no visual separation of the views, and a few clauses restate schema facts (e.g. that overview is the default), which makes it harder to scan than it needs to be.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With no output schema and six distinct view modes, the description still covers return format, truncation behavior, the main-document heuristic and its failure case ('the reply says when it has no \begin{document}'), conflict handling, and the external texcount dependency. Nothing an agent needs to call any view correctly appears to be missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the 3 baseline applies, but the description goes further: it explains what each view actually returns, that outline follows \input/\include and skips commented-out headings, that changes does not pull but compares against the last fetch, and it defines the 'likely main document' heuristic. That adds real meaning for the view and path parameters beyond the schema's terse enum strings.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

Opens with a specific verb and resource ('Read one project as a whole; view picks what') and then defines each of the six views concretely — overview returns path/main document/file counts, files lists paths by kind, outline lists sectioning commands, status reports branch/commits, changes shows the diff push_changes would publish, word_count runs texcount. An agent can distinguish this from read_file, search_project and read_history without opening any schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly routes to alternatives: 'Use read_file for one file's text, search_project to find which file mentions something, and read_history for older versions.' It also states the default and its intended moment ('overview... orients at the start of a task') and names the preconditions for each view (word_count needs texcount).

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.