Skip to main content
Glama

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
OVERLEAF_BASE_URLNoThe Overleaf origin/base URL. Session cookies are only sent to this base URL; no request leaves OVERLEAF_BASE_URL with them (used e.g. for self-hosted Overleaf).
OVERLEAF_ALLOWED_EFFECTSNoOptional access policy limit on which kinds of change the server may make. Checked before any request, through every interface.
OVERLEAF_ALLOWED_PROJECTSNoOptional access policy limit on which Overleaf projects the server may touch. Checked before any request, through every interface.

Instructions

Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.

These tools reach the signed-in account's Overleaf projects through Overleaf's private web APIs, as an unofficial client.

Find the project first. list_projects returns ids, newest first. get_project_tree returns the entities, rootDocPath (the default compile root), compiler, and imageName.

Projects. create_project, clone_project, and import_project_zip return a new projectId. A blank project's root is Overleaf's stub main.tex: after adding the manuscript, set rootFilePath with update_project_settings or delete the stub. manage_project trash, archive, and delete need confirmName equal to the project name; prefer trash, since delete is permanent.

Editing text. Call read_file before write_file or write_section and pass back its revision unchanged. On REVISION_CONFLICT, read again and reconcile; never reuse a stale revision or retry a write blindly. Send the complete new text, localPath for a local file, or edits for small changes. writeMode "tracked" records Overleaf tracked changes and never falls back to untracked. On a legacy (ShareJS) document, adding emoji or other characters above U+FFFF is refused.

Uploads. upload_file and batch_upload have no revision check and replace nothing unless asked. To replace a binary, pass overwrite: true or expectedHash from get_project_tree; for a text document, prefer write_file with localPath.

Folders. plan_sync compares a local folder with a project folder and changes nothing; show the user its plan. sync_directory applies it and requires its planToken, and in mirror mode confirmDeleteCount equal to the remoteOnly count. REMOTE_DRIFT means something changed since the plan; plan again. Offer download_project_zip as a backup first. delete_entities deletes several paths with confirmCount.

Destructive actions. manage_entity delete needs confirmPath equal to path; a wrong confirmation fails with CONFIRMATION_MISMATCH and changes nothing. download_file and download_project_zip replace a local file only with overwrite: true. Confirm with the user before deleting or overwriting anything.

Compiling. Without rootFilePath, compile_project builds the configured root. Judge the build by summary.builtCleanly, never by status: "success" only means a PDF came out. get_compile_log and download_compile_output read the log and PDF without recompiling. Compiles spend the account's allowance; do not compile in a loop.

Review. add_comment needs a fresh revision, 1-based line and UTF-16 column positions, and expectedText equal to the selected text. Before manage_tracked_changes, call list_tracked_changes and confirm them with the user, then pass that document's revision, the changeIds (both halves of a replacement), and confirmCount equal to their number. List again after each decision, REVISION_CONFLICT, or NOT_FOUND.

Errors are JSON with code, message, retryable, and details. On AUTH_EXPIRED, with the user's agreement call sign_in if listed; otherwise they run "npx overleaf-web-mcp login". POLICY_DENIED and PATH_OUTSIDE_ROOT mean this server's configuration forbids the call; do not work around it. Sessions lapse after five idle days unless "npx overleaf-web-mcp keepalive" is scheduled; auth_status reports sessionExpiresAt.

Prefer disposable projects for experiments and keep request volume low.

Capabilities

Features and capabilities supported by this server

Protocol revision2025-11-25

CapabilityDetails
tools
{
  "listChanged": true
}
prompts
{
  "listChanged": true
}
resources
{
  "listChanged": true
}

Tools

Functions exposed to the LLM to take actions

NameDescription
auth_statusA

Verify the saved Overleaf web session without exposing cookies. sessionExpiresAt is when the session lapses unless a request refreshes it first; Overleaf sessions last five days from their last use, and the CLI command overleaf-web-mcp keepalive can be scheduled to refresh them.

sign_inA

Open a browser window on the user's computer for them to sign in to Overleaf, and save the session, as the login command does. Call it only when the user agrees. A session that already works is returned at once and nothing opens. It waits up to 40 seconds: status waiting means the user is still signing in, so call it again only after they say they have finished. After a failure, ask the user before calling it again. Needs Google Chrome, Chromium, Brave, or Microsoft Edge.

list_projectsA

List the projects the account can access, newest first by default. Archived and trashed projects are hidden unless includeArchived or includeTrashed is set. Returns projects with id, name, accessLevel, lastUpdated, archived, and trashed, plus totalMatched (before limit) and totalProjects (everything the account can access). includeTags adds each project's tags ({ id, name }) and tags, every tag of the account with its id, name, color, and projectCount, empty ones included; use these ids with manage_tags. tag lists only the projects in the tag with that exact name; an unknown name is NOT_FOUND. Tags are the dashboard's own labels for this account; collaborators do not see them.

create_projectA

Create a new Overleaf project and return its projectId, url, and rootDocPath. A "blank" project still contains Overleaf's stub main.tex as its root document; after importing your own manuscript, point the project at it with update_project_settings or delete the stub with manage_entity. "example" seeds Overleaf's example paper.

clone_projectA

Copy an existing project, its files, root document, and compiler included, into a new project with the given name. Overleaf gives the copy the account's default TeX Live image and spell-check language; set them with update_project_settings when they matter. Use it to start from a lab or journal template project.

import_project_zipA

Create a new project from a local .zip archive of LaTeX sources. name defaults to the archive file name. The returned name is the one Overleaf stored, which can differ: Overleaf uses the root document's \title when present and adds " (n)" when the name is already taken; use it as confirmName. If the project was imported but its name could not be read back, the error (AUTH_EXPIRED, POLICY_DENIED, or TIMEOUT from that read, else REMOTE_ERROR) is never retryable and carries the new projectId in details; do not import again. Overleaf caps archives at about 50 MB and rate-limits this route: RATE_LIMITED means wait details.retryAfterMs before trying again, and nothing was created. Set the root document afterwards with update_project_settings if the archive has more than one .tex file at the top level.

manage_projectA

Rename, trash, restore, archive, unarchive, or permanently delete a project. trash, archive, and delete require confirmName to equal the current project name exactly, else CONFIRMATION_MISMATCH and nothing changes. trash is the normal way to remove a project and is reversible with restore or in the web UI. delete is permanent and only succeeds on a project that is already trashed. Confirm with the user before trashing or deleting.

update_project_settingsA

Persist the project's root document, TeX engine, TeX Live image, or spell-check language in Overleaf's own project settings, so the web UI's Recompile follows the change. rootFilePath must name an existing .tex, .ltx, .Rtex, or .Rnw document; any other extension is INVALID_ARGUMENT before any request. Settings are applied one request at a time; if one fails, the error keeps its code, lists the settings already stored in details.applied and the failed one in details.failed, and no later setting is sent. Returns the settings as re-read from the project. Provide at least one field.

manage_tagsA

Create, edit, or delete the tags that organize projects on the Overleaf dashboard, or add projects to a tag or remove them. Tags belong to this account; collaborators do not see them. Read tags and their ids with list_projects includeTags. create takes name (unique among the account's tags) and an optional color; edit takes tagId and a new name, color, or both; delete takes tagId and confirmName equal to the tag's current name, else CONFIRMATION_MISMATCH, and removes the tag, never its projects; add_projects and remove_projects take tagId and projectIds, 1 to 100: add_projects only projects this account can access, remove_projects also an id the tag holds that the account can no longer open (NOT_FOUND names any other in details.projectIds). A name another tag has is INVALID_ARGUMENT with details.kind tag_name_taken and details.tagId, and an unknown tagId is NOT_FOUND, both before anything is sent. Every change is read back: tag is the result, and verified says whether the read-back confirmed it. A change whose answer was lost is never resent: recoveredAfterTimeout means the read-back showed it applied, and OUTCOME_UNKNOWN means read the tags before acting. Overleaf allows about 30 tag changes of each kind a minute; RATE_LIMITED means wait. Confirm deletes with the user first.

get_project_treeA

Return the project file/folder tree with entity IDs and paths, plus the root document, compiler, TeX Live image, and spell-check language Overleaf uses. Each binary file entity carries hash, a git blob hash equal to git hash-object <file>; text documents have no hash and must be compared by reading their content. includeTags adds tags, this account's dashboard tags on the project as { id, name }, from one more request; change them with manage_tags.

read_fileA

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.

search_projectA

Search a project's text documents for a literal string and return where it occurs, instead of reading every document. Returns matches [{ filePath, line, column, preview }], with 1-based line and column (UTF-16 units, as the editor counts) and preview the matching line cut to 160 characters around the match, with … where cut; totalMatches, every match including those past limit; truncated; filesSearched; and binaryFilesSkipped. query is matched literally, never as a regular expression, and ignoring case unless caseSensitive. path narrows the search to one document or a folder; one that names nothing is NOT_FOUND. Documents are read one at a time as read_file reads them, so text in a tracked deletion is not found, and at most 300 per call: it saves calls and context, not wall-clock time. A larger scope, or more matches than limit, returns what was found with truncated true.

write_fileA

Replace a text document with a verified OT update that changes only the words that differ, optionally recorded as tracked changes, one per changed group of words; where a changed word touches a comment or tracked change, the update is one edit from the first change to the last instead. Supply the new text through exactly one of content (the whole text), localPath (a local file holding it, never sent through the tool call), or edits: 1 to 100 { oldText, newText } applied in order to the document at revision, each oldText matching exactly once in the text the edits before it left, with whitespace and line endings exact; an empty newText deletes. An oldText that does not match is INVALID_ARGUMENT with details.kind edit_not_found, one that matches more than once edit_ambiguous, each with details.editIndex (0-based), and nothing is sent; otherwise the result is written as content would be. A write that hit a timeout, a lost socket, or an error Overleaf reported on the document after the update was sent is never resent: the live document is observed instead, and recoveredAfterTimeout: true means the intended text was confirmed. An update Overleaf refused as too large is UPDATE_TOO_LARGE with details.outcome not_applied: nothing was stored. On a ShareJS (legacy editor) document, text that adds a character outside the Basic Multilingual Plane, such as an emoji, adds another copy of one the document holds, or changes their order is INVALID_ARGUMENT with details.line (1-based) and nothing is sent, because Overleaf would store it as U+FFFD; editing text on either side of one the document already holds is fine. With writeMode tracked, a write Overleaf applied without recording it as tracked changes by this account is PROTOCOL_UNSUPPORTED with details.kind applied_untracked and details.liveRevision: it is live and not reverted, so read the file before writing again; if another update followed the write before that check, it is REVISION_CONFLICT with details.outcome unknown instead. A review-only collaborator can write only with writeMode tracked, and a read-only one cannot write: either is PERMISSION_DENIED before anything is sent.

create_fileA

Create a text document and optionally record non-empty initial content as tracked changes. The content is written as by write_file once the empty document exists, so on a ShareJS (legacy editor) document, content that adds an emoji or other character outside the Basic Multilingual Plane is refused with INVALID_ARGUMENT; a timeout, a lost socket, or an Overleaf error after sending is observed, never resent; content the account may not write, such as untracked content from a review-only collaborator, is PERMISSION_DENIED before it is sent; and tracked content Overleaf applied without recording it as tracked changes by this account is PROTOCOL_UNSUPPORTED with details.kind applied_untracked, live and not reverted. If reading back or writing the content fails after the document was created, the error keeps its code and adds details.created: true; the document then exists, possibly empty, so do not create it again: read it with read_file and write the content with write_file.

manage_entityA

Create a folder, rename, move, or delete an entity. Deletion requires confirmPath to exactly equal path. A name already used in the target folder (the entity's own included), and a folder moved into itself or one of its subfolders, are INVALID_ARGUMENT before anything is sent.

upload_fileA

Upload a local file into a project folder. Overleaf decides whether it becomes a text document or a binary file, by extension and UTF-8 validity. Something already at the path is replaced only when asked for, and otherwise nothing is sent. Replacing a binary needs overwrite: true, or expectedHash equal to its hash from get_project_tree; without either it is CONFIRMATION_MISMATCH, and a different hash is REMOTE_DRIFT. expectedHash is checked just before the upload, not atomically with it. Replacing a text document is a blind write with no revision check, so it needs uncheckedDocumentReplace: true, else INVALID_ARGUMENT: prefer read_file then write_file with localPath, and pass uncheckedDocumentReplace only when nobody else is editing it. overwrite: false refuses any replacement with CONFIRMATION_MISMATCH. A replaced text document keeps its entity ID; a replaced binary file may get a new one. writeMode in the result is tracked when Overleaf records a document replacement as tracked changes, because track changes is on for this account.

batch_uploadA

Upload a list of local files to explicit project paths in one call, instead of one upload_file call per file. Each destinationPath is the full project path including the file name; missing folders are created. onConflict decides what happens when a document or file is already at a destination path: "fail", the default, refuses the whole call with CONFIRMATION_MISMATCH listing those paths, before anything is uploaded; "skip" leaves them untouched and lists them in skipped; "overwrite" replaces a binary file. Replacing a text document has no revision check, so with "overwrite" each one also needs uncheckedDocumentReplace: true, else that file fails with INVALID_ARGUMENT; use write_file or sync_directory for documents a collaborator may be editing. A folder at a destination path, or a file where a folder is needed, fails that file in any mode. Every path is checked before anything is sent: a duplicate destination or a missing local file fails the call with nothing uploaded. Failures are per file and nothing is retried: the call continues past a failure unless stopOnError, and stops at RATE_LIMITED (Overleaf allows about 500 uploads per project in 15 minutes). It returns status, completed (with replaced per upload), skipped, failed, remaining, and verified, which is true when the tree read back afterwards confirmed every completed entry. A timed-out upload is classified from that read-back, never resubmitted: recoveredAfterTimeout when the path holds the local bytes, OUTCOME_UNKNOWN when the tree cannot tell. It saves tool calls, not time. Confirm overwrites with the user first.

download_fileA

Download one Overleaf document or binary file to an explicit local path. Refuses to replace an existing local file unless overwrite is set. The local path is checked before anything is fetched: an existing file without overwrite, or a folder (or a link to one) at localPath, is INVALID_ARGUMENT, a missing parent folder is NOT_FOUND, and a folder that cannot be written is INVALID_ARGUMENT with details.errno. With overwrite, an existing file is replaced atomically, keeping its permissions, so its folder must be writable.

download_project_zipA

Download the whole project, sources and binaries, as one zip archive (Overleaf's "Download as zip") to a local path on the server's own disk. The folder must exist. An existing file is replaced only when overwrite is true, else CONFIRMATION_MISMATCH and nothing is downloaded; a replacement is atomic, so a failed or incomplete download leaves the old file intact. Offer it as a backup before a mirror sync_directory or an overwriting batch_upload. Overleaf allows about 10 downloads per project a minute, so on RATE_LIMITED wait a minute. PERMISSION_DENIED here can also mean the session expired; check auth_status. Returns the absolute localPath, bytes, and replaced.

plan_syncA

Compare a local folder with a project folder and report what sync_directory would do, changing nothing. Binary files compare by git blob hash at no cost; each text document with a local counterpart, or present only in the project, is read once through the project's queue, so this suits tens of documents, not thousands. Returns toUpload (new or changed), identical (a count and the first 25 paths unless verbose), remoteOnly (what mirror mode would delete, each folder collapsed to one entry that includes its contents), conflicts (a file where the other side has a folder, or non-UTF-8 text where the project has a document; sync_directory cannot apply these), ignored, and planToken. Show the plan to the user before syncing. localFolderPath is on the server's disk; a symbolic link that leads outside it fails with PATH_OUTSIDE_ROOT.

sync_directoryA

Make a project folder match a local folder: upload new and changed files, and in mirror mode also delete what exists only in the project. Call plan_sync first, confirm the plan with the user, and pass its planToken; if the project or the folder changed since, REMOTE_DRIFT is returned and nothing changes. A planToken is required: without one the call is refused with CONFIRMATION_MISMATCH before anything is read, unless an additive sync passes unplanned: true to run without a plan on purpose (planned is then false); a mirror sync always needs one. Changed text documents are replaced through revision-checked write_file edits, recorded as tracked changes when writeMode is tracked, so a concurrent edit fails that file with REVISION_CONFLICT rather than being overwritten. Binaries and new files are uploaded, and one whose path changed since the plan fails with REMOTE_DRIFT; with writeMode tracked, new .tex, .bib, and similar text files are created with tracked content instead. Missing folders are created. Uploads and writes run first. Deletes run only in mirror mode, only when confirmDeleteCount equals the number of remoteOnly entries, else CONFIRMATION_MISMATCH, and never after any upload or write failed. Failures are per file and nothing is retried: the call continues unless stopOnError, then returns status, completed, failed, remaining, and a planToken to resume with. Each failed entry carries the step's error details, and kind: applied_untracked when a tracked step applied without being recorded as tracked changes (it is live, not reverted); a create that failed with details.created left its document behind, and resuming with the planToken writes it while it is still empty or holds the local text. On a ShareJS (legacy editor) document, text that adds an emoji or another character outside the Basic Multilingual Plane, or reorders existing ones, fails that file with INVALID_ARGUMENT. It saves tool calls, not time.

delete_entitiesA

Delete several documents, files, or folders in one call. confirmCount must equal the number of paths, else CONFIRMATION_MISMATCH. Every path is resolved before anything is deleted, so a missing one fails the call with NOT_FOUND and changes nothing. Deleting a folder removes everything inside it, so list the folder alone, not its contents too. Continues past a failed delete unless stopOnError, and returns status, completed, failed, and remaining. Confirm the list with the user first.

get_full_documentA

Flatten a LaTeX document latexpand-style: starting from rootFilePath, or from the project's root document when it is left out, every \input, \include, \subfile, and \import (also \subimport, \inputfrom, \subinputfrom, \includefrom, \subincludefrom) is replaced by the text of the file it names, recursively, and the rest of the text is kept exactly. Directives inside % comments and verbatim text are skipped. A path resolves relative to the project root first and then to the including file's folder (the other way round for \subimport and its relatives); \input and \subfile try the name as written and then with .tex, \include always means .tex, and \subfile takes in only the named file's document body. \include does not add its page breaks to the text. A directive that cannot be followed stays as written and is listed in unresolved with file, line (1-based), target, and reason: missing (no document at any candidate path), binary_file (the path is an uploaded file, not a text document), macro_argument (the path uses a macro or parameter), or excluded_by_includeonly (an \include an \includeonly list leaves out; includeOnly lists it). Returns rootFilePath, text, files (every file visited, each once, in order), unresolved, includeOnly when a file sets it, and sourceMap: one entry per run of text copied from one file, { flattenedStart, flattenedEnd, filePath, docId, originalStart, originalEnd, revision }, offsets in UTF-16 code units, half-open, into text and into that file's LF-normalized content. revision is the file's revision as read_file returns it: route an edit decided on in the flattened view back with write_file or write_section on that file, with that revision, never by writing the flattened text anywhere. Each file is read separately, so files can change between reads; each revision matches the text it was read with. text joins each file's text to what follows its directive with nothing in between, as written; a comment on a file's last line therefore reads on into the next text if text is compiled as is, though section parsing treats each file separately. An include cycle is INCLUDE_CYCLE with details.chain; nesting deeper than maxDepth is INCLUDE_DEPTH_EXCEEDED (it never cuts the result short); a result longer than 8388608 code units is DOC_TOO_LARGE with details.kind flattened, and includes that take in files more than 10000 times in all, counting a file once per inclusion, are DOC_TOO_LARGE with details.kind includes: start from a file further down, or read the files one at a time.

get_sectionsA

Parse LaTeX section headings. By default this reads one file only and never follows input/include directives: singleFileOnly is true and offsets are into that file. With followIncludes: true, filePath is the document to start from (usually the root document), the headings are parsed in the text get_full_document returns for it, and singleFileOnly is false: start, headingEnd, bodyStart, and end are offsets into that flattened text, and each section adds filePath (the file holding its heading), revision (that file's revision, for write_section), and spansFiles (true when text from another file, other than white space, falls inside the section, or when an include directive or a file end falls inside its heading, so write_section refuses it). A section whose heading is in an included file ends, at the latest, where that file ends: the including file's text after the directive, such as \bibliography or \end{document}, belongs to no section. The section id then names its file, as path#command:offset, so pass followIncludes: true to get_section_content and write_section with it; the two modes end a body in different places, so an id from one mode is NOT_FOUND in the other. unresolved lists the directives that could not be followed, as in get_full_document. revision is always filePath's own.

get_section_contentA

Read one parsed section body. The body runs from after the heading to the next heading at the same or a higher level, so it includes nested subsections, and the last section runs to the end of its file, including \end{document} when the file holds it. By default this reads a single file. With followIncludes: true, filePath is the document get_sections started from and sectionId comes from that call; a section that lies in one file is read as that file holds it, include directives included, which is exactly what write_section replaces, and revision is that file's revision; a section in an included file ends where that file ends, so it never holds the including file's \end{document}. A section with spansFiles: true reads as flattened text across files, for reading only.

write_sectionA

Replace one section body in a single file using a revision-checked write, optionally recorded as tracked changes. By default included files are not traversed. With followIncludes: true, filePath is the document get_sections started from, sectionId comes from that call, and revision is the section's revision from it: the body is replaced in the file holding the heading, through the same revision-checked write, and filePath in the result names that file. The revision is checked against that file first: a file changed since get_sections is REVISION_CONFLICT with details.filePath and details.liveRevision, and nothing is sent. A section with spansFiles: true is refused with INVALID_ARGUMENT, details.kind spans_files, before anything is sent; edit each file with write_file instead. A section in an included file ends where that file ends, so do not add the including file's \end{document} to content. content replaces the whole body as get_section_content returns it, including nested subsections and, for the last section, \end{document}, so read it first and keep what should survive. The write is made as by write_file: on a ShareJS (legacy editor) document, content that adds an emoji or other character outside the Basic Multilingual Plane, or reorders existing ones, is refused with INVALID_ARGUMENT; a timeout, a lost socket, or an Overleaf error after sending is observed, never resent; a review-only collaborator can write only with writeMode tracked and a read-only one cannot write, either being PERMISSION_DENIED before anything is sent; and a tracked write Overleaf applied without recording it as tracked changes by this account is PROTOCOL_UNSUPPORTED with details.kind applied_untracked, live and not reverted.

check_referencesA

Find broken cross-references and citations without compiling. Walks the manuscript from rootFilePath, or the project's root document, through its include directives as get_full_document does, and reads the .bib files named by \bibliography (.bib added) or \addbibresource, resolved from the project root, uploaded or linked ones (from a reference manager) included. It collects \label keys; the keys of \ref, \eqref, \pageref, \autoref, \nameref, \cref, \Cref, \vref, and their relatives, comma-separated lists split; and the keys of \cite and the natbib and biblatex citation commands, checked against .bib entries and \bibitem keys. Returns rootFilePath; undefinedReferences and undefinedCitations, each use of a key nothing defines (undefinedCitations is empty and citationsChecked false when a named bibliography could not be read); unusedLabels, labels nothing refers to; unusedBibEntries, entries nothing cites (none when \nocite{*} is used); duplicateLabels, every definition of a key defined more than once; each a list of { key, filePath, line } (1-based), at most 500 per list, with truncated true when one was cut; filesRead; and unresolved, as get_full_document reports it, plus bibliography files that are missing (missing) or named by a macro (macro_argument). It reads source text, not TeX: % comments and verbatim text are skipped, but keys built by macros, labels defined inside custom commands or packages, cross-document references, and conditionals are not understood, so a result is a prompt to look, not proof. A compile remains the authority. Errors are those of get_full_document.

compile_projectA

Compile a project and report on the build from its logs. Omit rootFilePath to build the root document configured in Overleaf, which is what the web UI's Recompile button uses; pass it to build a different document for this call only. Check summary.builtCleanly, not status: Overleaf reports status "success" whenever a PDF came out, even when LaTeX hit errors along the way. builtCleanly is true only when a PDF was produced, output.log was read, and it reports no error. summary lists the first 20 errors and warnings as { file?, line?, message } (errorCount and warningCount count all of them), undefined references and citations, missing files, pageCount, and pdfSizeBytes; messages never quote the document. A LaTeX error that stopped the build returns status "failure" with the same summary rather than an error. outputFiles is Overleaf's listing, less an output.blg and output.bbl left over from an earlier build when BibTeX did not run for this one. buildRef names this build to get_compile_log and download_compile_output, also in a later process. stopOnFirstError gives a short log holding the one error that matters; draft skips images for faster text-only builds. Compiles spend the account's compile allowance, so read the summary instead of recompiling. Errors: COMPILE_RATE_LIMITED (Overleaf ran nothing; wait details.retryAfterMs when given, then compile once more), COMPILE_UNAVAILABLE (try later), COMPILE_TIMEOUT (the build hit the time limit; details.buildRef, when present, reaches its partial log), COMPILE_FAILED (no build to report on), and TIMEOUT (the request timed out while Overleaf may still be compiling; it is not retried).

stop_compileA

Stop the active Overleaf compile for a project. Returns { stopped: true }.

get_compile_logA

Read a build's LaTeX log (output.log) or BibTeX log (kind "bibtex", the .blg file), without compiling again. kind "bibtex" is NOT_FOUND when BibTeX did not run for the build, even if Overleaf still lists an output.blg left over from an earlier build. Without buildRef it reads the latest build compile_project made in this server process, else NO_BUILD; Overleaf keeps build output only for a while, and an expired build is BUILD_NOT_FOUND. At most 1 MB of the log is read, from its start, and the last tail lines are returned (default 200, at most 2000, and at most 100000 characters). format "errors-only" returns only the lines that start an error. errorLines lists the first 100 error lines with their 1-based line numbers, each cut to 240 characters. truncated says whether anything of the log was left out. The log quotes source lines near each error; prefer compile_project's summary when that is enough.

download_compile_outputA

Save a build's compiled PDF, or another output file such as output.log, output.blg, or output.synctex.gz, to a local path on the server's own disk, in one call. file defaults to output.pdf and must be a relative output path without "..". Without buildRef it uses the latest build compile_project made in this server process, else NO_BUILD; a file the build did not produce, an output.blg or output.bbl left over from an earlier build included, is NOT_FOUND, and an expired build is BUILD_NOT_FOUND. The folder must exist. An existing file is replaced only when overwrite is true, else CONFIRMATION_MISMATCH and nothing is downloaded; a replacement is atomic. A .pdf that does not start with %PDF- is PROTOCOL_UNSUPPORTED and nothing is written. Returns the absolute localPath, file, sizeBytes, buildId, and replaced.

inspect_buildA

Map between a build's PDF and its source with SyncTeX, or count words, without reading any text. source_to_pdf takes filePath, a 1-based line, and an optional column, and returns positions where that line lands: { page, h, v, width, height }, in PDF points (1/72 inch) from the page's top-left corner, v at the box's baseline. SyncTeX answers for a line with no output of its own, such as a comment, with the nearest output. pdf_to_source takes a 1-based page and a point h, v measured the same way, and returns locations { filePath, line, column } of the source that produced it. Both read the build buildRef names, from compile_project in this process or another, or else the latest build of this project in this process (NO_BUILD when there is none); a build Overleaf no longer keeps is BUILD_NOT_FOUND: compile again. word_count runs texcount over the current sources from filePath, or the project's root document, through its includes, with no compile and no build needed, and returns rootFilePath and wordCount: textWords, headWords (in headings), outsideWords (in captions and other text outside the body), totalWords (their sum, as texcount sums them), headers, floats, mathInline, mathDisplay, and errors (texcount's parse errors). An answer in an unknown shape is PROTOCOL_UNSUPPORTED.

list_commentsA

List review comment threads and lazily resolve their document positions. Defaults to open threads. author keeps threads with a message whose author display name contains it (case-insensitive) or whose author id equals it. Returns threads, each with id, status, messages (id, author { id, displayName } or null, content, ISO timestamp), resolvedAt and resolvedBy when resolved, and when located filePath, start, end (1-based line, UTF-16 column), and quotedText; a thread without a document range has unlocated: true. Without filePath, positionsUnavailable: true means the deployment has no project-wide range index and every thread is unlocated.

reply_to_commentA

Reply to an existing review thread. An unknown threadId fails with NOT_FOUND and posts nothing. Returns threadId and the created message (id, author { id, displayName }, content, ISO timestamp), plus trackChangesActive and writeMode. A timed-out reply is never resubmitted: it returns recoveredAfterTimeout when the thread shows exactly one new matching message from this account, else OUTCOME_UNKNOWN; do not retry it blindly.

add_commentB

Add and verify an anchored review comment using UTF-16 positions and expectedText. Returns threadId, the created thread (id, status, messages with author { id, displayName }, content, and ISO timestamp) when it could be read back, the resulting document revision and protocol, trackChangesActive, writeMode, and recoveredAfterTimeout when an attachment that timed out, lost its socket, or could not be read back was confirmed by observation.

set_comment_statusA

Resolve or reopen a review thread and verify its resulting document revision. filePath must be the document the thread is anchored in, as list_comments reports it; a thread not anchored there fails with NOT_FOUND and nothing changes. On a history-OT document a status change needs owner or edit access: review-only or read-only access is PERMISSION_DENIED before anything is sent. Returns threadId, status, the resulting revision, trackChangesActive, writeMode, and recoveredAfterTimeout when a change that timed out, lost its socket, or could not be read back was confirmed by observation.

list_tracked_changesA

List tracked changes (suggestions) and where they are, so they can be accepted or rejected with manage_tracked_changes. With filePath, that document is read and its list is authoritative. Without it, Overleaf's project range index only chooses which documents to read: just the documents it lists with changes are read, its change ids are never used, and it may lag or leave a document out, so name a document with filePath for an authoritative list (this matters most for history-OT documents, whose index ids are never valid). indexUnavailable: true means the deployment has no index and no document was read. type and authorId keep only matching changes; limit (default 100, at most 500) caps the changes returned across all documents, totalMatched counts every match, and truncated says some were left out. Returns documents, each with filePath, revision (pass it to manage_tracked_changes), protocol, totalChanges (every tracked change in the document, unfiltered), undecidableChanges when some changes carry no id and cannot be decided by this server, and changes: changeId, type (insert: suggested text that is visible; delete: suggested removal of text that is no longer visible), start and end (1-based line and UTF-16 column in the text read_file returns; a delete is a point, so its start equals its end), length in UTF-16 units, excerpt of the inserted or deleted text (at most excerptChars UTF-16 units, default 120, 0 for none) with excerptTruncated, authorId (an Overleaf user id, or null), an ISO timestamp, and pairedChangeId linking the insert and the delete of one replacement. Also returns trackChangesActive. Ids merge and split as the document is edited, and history-OT ids are valid only with the revision they were listed with, so list again before deciding.

manage_tracked_changesA

Accept or reject tracked changes in one document. First list them with list_tracked_changes and confirm them with the user, then pass that document's filePath and revision, the changeIds (1 to 500, each once), and confirmCount equal to the number of changeIds; a missing or different confirmCount is CONFIRMATION_MISMATCH and nothing is sent. Accepting an insert keeps its text and accepting a delete removes it; rejecting an insert removes its text and rejecting a delete restores it. A tracked replacement is an insert and a delete linked by pairedChangeId: pass both ids. Checked in this order before anything is sent: access (only the owner and collaborators who can edit may decide; review-only and read-only access is PERMISSION_DENIED), whether track changes is available for the project (REVIEW_UNSUPPORTED, details.kind "feature_disabled"; review may need a plan that includes it), the revision (REVISION_CONFLICT), that every id is a tracked change in this document (NOT_FOUND, details.missingChangeIds), and that no change left out overlaps a chosen one (INVALID_ARGUMENT, details.overlappingChangeIds). REVIEW_UNSUPPORTED with details.kind "route_unavailable" or "document_protocol" means this Overleaf cannot decide changes this way. The decision is sent once and verified on a fresh read of the document. One that timed out is observed, never resent: recoveredAfterTimeout: true when it applied, TIMEOUT or REMOTE_ERROR with details.outcome "not_applied" when it did not, REVISION_CONFLICT with details.outcome "unknown" when the document changed meanwhile, and OUTCOME_UNKNOWN when it could not be observed. A repeated decision changes nothing: it fails with REVISION_CONFLICT when the first one changed the document's revision, as every reject and every history-OT decision does, or with NOT_FOUND when it did not, as after an accept on a ShareJS document, which leaves the revision as it was. Rejecting on a ShareJS (legacy editor) document may notify the change's author; on a history-OT document it does not. Returns action, filePath, changeIds, the resulting revision and protocol, remainingChangeCount (tracked changes left in the document), trackChangesActive, and recoveredAfterTimeout. List again after every decision and after REVISION_CONFLICT or NOT_FOUND: ids merge and split, and history-OT ids are valid only with the revision they were listed with.

monitor_project_historyA

Poll one recent project-history window and return updates newer than an optional version cursor. In a group that starts before the cursor, only project operations at or after it are listed. Returns projectId, currentVersion (null when the window is empty), nextSinceVersion (pass it back as sinceVersion; on an empty window it repeats sinceVersion, or is null without one), hasEarlierHistory, gapDetected, and updates, newest first. Each update has fromVersion, toVersion, ISO startedAt and endedAt, authors ({ id, displayName } or null), paths, projectOperations (add, rename with newPath, remove, each with atVersion), labels, and origin ({ kind, path?, timestamp?, version? } or null).

read_file_versionA

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.

manage_historyA

Label the project's current version as a checkpoint, or restore one document to an earlier version. create_label takes comment, 1 to 1000 characters, and labels the version current just before the call; create one before a large edit, so the version before it can be found again. It returns label { id, comment, version, createdAt } and verified (the label was read back). restore_file takes filePath, version or labelId, and confirmPath equal to filePath, else CONFIRMATION_MISMATCH and nothing is sent. filePath is the path the document had at that version; one the version lacks is NOT_FOUND, and a binary file INVALID_ARGUMENT with details.kind binary_file, before anything is sent. Overleaf deletes the live file and creates a new document with that version's text, tracked changes, and comments, so changes and comments made since are gone, comment threads get new ids, the document gets a new docId, and every revision of the old one stops working; a root document stays the root. It returns filePath, version, docId, previousDocId (null when nothing was at the path), the new document's revision, protocol, trackChangesActive, and contentMatches (its text equals what read_file_version reads). Nothing is retried: a lost or failed answer is read back, giving recoveredAfterTimeout: true when it applied, REMOTE_ERROR with details.outcome not_applied when Overleaf failed it and nothing changed, and otherwise OUTCOME_UNKNOWN: read the history or the tree before acting again.

Prompts

Interactive templates invoked by user choice

NameDescription
revise_manuscriptSteps to revise text in an Overleaf project with the tools: find the document, read it with its revision, agree the change with the user, write it back against that revision (tracked or not), and compile.
address_reviewer_commentsSteps to work through the comment threads of an Overleaf project with the tools: list and summarize them, read the commented text, reply, add comments, resolve or reopen threads, and revise the text as tracked changes, each only as the user decides.
sync_sourcesSteps to bring a local folder into an Overleaf project with the tools: plan the sync, show the plan and ask, apply exactly that plan with its token, read the result, and compile.

Resources

Contextual data attached and managed by the client

NameDescription

No resources

TDQS

A3.8/5.0

Scored across 41 tools

Disambiguation4/5

The tools generally have distinct scopes, and the descriptions clearly separate similar areas such as read_file, get_full_document, get_sections, get_section_content, and write_section. With 41 tools there is still some boundary tension among manage_entity/delete_entities and upload_file/batch_upload/sync_directory, but the detailed descriptions usually resolve it.

Naming Consistency4/5

Names are consistently snake_case and mostly follow a verb_noun pattern, e.g. compile_project, list_comments, write_file, and manage_tracked_changes. Minor deviations such as auth_status and a few generic manage_* names keep it from perfect consistency.

Tool Count2/5

41 tools is excessive for a coherent MCP surface, even for a broad Overleaf client, and several batch/sync/read variants could be consolidated. The large count increases context and selection burden beyond what the domain strictly requires.

Completeness4/5

The surface covers project and file lifecycle, compilation, logs, downloads, comments, tracked changes, history, tags, and sync, so core workflows are well supported. Gaps remain around collaboration/sharing and some finer comment or label lifecycle operations, but the main Overleaf workflows are present.

Maintenance

ActivityActive
ResponsivenessNo recent community issues