Skip to main content
Glama

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
OVERLEAF_COOKIESNoSession for headless use: the full Cookie header of a signed-in browser
OVERLEAF_SESSIONNoSession for headless use: only the overleaf_session2 cookie value
OVERLEAF_MCP_HOMENoData directory (default ~/.overleaf-mcp)
OVERLEAF_GIT_TOKENNoGit token for a single project, used with OVERLEAF_PROJECT_ID instead of a session
OVERLEAF_PROJECT_IDNoProject id for OVERLEAF_GIT_TOKEN
OVERLEAF_SERVER_URLNoOverleaf server, e.g. a self-hosted one; also where sign_in signs inhttps://www.overleaf.com

Instructions

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

Tools for the user's Overleaf (LaTeX) projects, connected live to overleaf.com or a self-hosted Overleaf.

  • If a tool reports that nobody is signed in, call sign_in: it opens the Overleaf login page for the person.

  • Find projects with list_projects; refer to them by name or id. If exactly one project is pinned, "project" can be omitted.

  • Explore with list_files, get_outline, get_section and read_file. grep finds exact text or regexes across projects; search ranks passages by topic.

  • Edit with edit_file (exact oldText → newText; copy oldText from read_file without line numbers). Edits are live and merge with collaborators' typing.

  • Use suggest=true when the author should review changes: they appear as tracked changes in Overleaf.

  • Overleaf documents cannot contain emoji or other non-BMP characters.

  • A project marked "synced to local folder" can also be edited through those local files; the sync pushes them.

  • After editing LaTeX, compile reports errors with file:line so they can be fixed.

Capabilities

Features and capabilities supported by this server

Protocol revision2025-11-25

CapabilityDetails
tools
{
  "listChanged": true
}

Tools

Functions exposed to the LLM to take actions

NameDescription
statusA

Shows which Overleaf account is signed in, the server, pinned projects and the search engine in use. Call this first if other tools report sign-in problems.

sign_inA

Signs in to Overleaf so the other tools work. Without a cookie it opens the Overleaf login page in a browser window on this computer (Google, ORCID, institutional SSO and passwords all work) and waits for the person to log in. If the person gives you their overleaf_session2 cookie, pass it instead. Only needed once; the session is shared by every Overleaf tool on this computer.

list_projectsA

Lists the projects in the signed-in Overleaf account, pinned first and then newest first, with each project's id, last update, owner, access level and tags. Read-only; needs a web sign-in (see sign_in) and keeps the list for 30 seconds. Use it to find the name or id that other tools take as "project"; list_files shows the files inside one project.

pin_projectsA

Pins or unpins projects; other pins stay as they are. Pinned projects are the default scope for grep and search, and while exactly one project is pinned, other tools can leave out "project". Pins are saved on this computer and shared with the VS Code panel; nothing changes on Overleaf. Pin the paper you are working on at the start, so later calls need no project.

create_projectA

Creates a new project in the signed-in Overleaf account (needs a web sign-in) and returns its name and id. "blank" starts with an empty main.tex; "example" starts from Overleaf's example document. Fill it afterwards with write_file, upload_file and create_folder.

list_filesA

Shows the file and folder tree of one project and marks the main document. Docs are editable text (read_file, edit_file); "binary/uploaded" files are images, PDFs and other uploads (download_file). Read-only. Use it to get exact paths before reading or editing; get_outline shows the section structure instead.

read_fileA

Reads a file live from Overleaf (always the latest content, including collaborators' unsaved typing). Optionally a line range. Images (png/jpg/gif/webp) are returned as images. Read-only. To read one section by its title use get_section; for other binary files use download_file.

grepA

Exact text or regex search (ripgrep) across one or many projects, with file:line results and optional context. Uses local snapshots that refresh automatically when Overleaf reports changes. For topic-style questions use "search" instead.

searchA

Relevance-ranked full-text search (BM25 with fuzzy and prefix matching) that finds passages about a topic, e.g. "related work on diffusion models", across one or many projects. Returns file:line ranges with snippets; read_file or get_section can then fetch the text. Read-only. For exact text or a regex use grep instead.

get_outlineA

Outline of a LaTeX project (parts, chapters, sections, …) following \input/\include from the main document, with file:line for each heading and a note on included files that are missing. Read-only. Use it to see a paper's structure or find where a section lives; then get_section reads one section, or read_file reads the lines.

get_sectionA

Returns the LaTeX of one section (up to the next heading of the same or higher level), found by title anywhere in the document, with its file and line range. Read-only. Use it to read a section without the whole file (get_outline lists the titles); to change it, copy text from here into edit_file.

edit_fileA

Applies exact search-and-replace edits to a file, live: collaborators see the change instantly and concurrent typing is merged, not overwritten. All edits apply together or not at all, and Overleaf records them in the project history. With suggest=true the edits become tracked changes the author can accept or reject in Overleaf's review panel. Use it for targeted changes; write_file replaces a whole file.

write_fileA

Writes the full content of a text file, creating it (and missing folders) if needed. Existing docs are updated in place via a minimal live diff, so collaborators keep their cursors. Prefer edit_file for small changes.

delete_fileA

Deletes a file or folder (with its contents) from a project, for every collaborator. These tools cannot undo it, but Overleaf keeps the deleted content in the project history. To rename or reorganise, use move_file instead.

move_fileA

Moves and/or renames a file or folder inside one project, creating missing target folders. Fails if something already exists at the target path; nothing is overwritten. References in the LaTeX (\input, \includegraphics) are not updated, so fix them with edit_file afterwards. Use it rather than writing a copy and deleting the original.

create_folderA

Creates a folder, and any missing parent folders, in one project. Does nothing if the folder already exists; fails if a file has that path. Rarely needed: write_file, upload_file and move_file create missing folders themselves. Projects reached through a Git token cannot hold empty folders.

upload_fileA

Uploads a file from this computer (e.g. a generated figure or .bib) into a project, replacing any file with the same path. For text you already have, write_file is simpler; download_file goes the other way.

download_fileA

Saves a copy of one project file of any type (PDF, image, .bib, .tex) to a path on this computer, creating missing local folders and replacing a file already at that path. Changes nothing on Overleaf. Use it for binary files that read_file cannot show as text, or to work on a file with local tools; for the compiled PDF use compile with savePdfTo.

compileA

Compiles the project on Overleaf's servers and reports LaTeX errors and warnings with file:line, so they can be fixed with edit_file. Optionally saves the PDF locally.

historyA

Recent changes recorded in Overleaf's project history: versions, authors, times and touched files. Use history_diff to see what changed between versions.

history_diffA

Unified diff of one file between two history versions (from the history tool's vFrom→vTo numbers), e.g. to review what a collaborator changed. Read-only; binary files have no text diff.

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

TDQS

A4.2/5.0

Scored across 21 tools

Disambiguation5/5

Every tool targets a distinct resource+action, and descriptions explicitly disambiguate the risky pairs: search vs grep, read_file vs get_section vs download_file, edit_file vs write_file, move_file vs delete+write, create_folder vs implicit folder creation. An agent can route a request to the right tool from the names alone, with the descriptions confirming edge cases.

Naming Consistency4/5

The bulk of the set follows a clean verb_noun pattern (list_projects, create_project, read_file, edit_file, delete_file, move_file, create_folder, upload_file, download_file, get_outline, get_section, history_diff). A handful of tools fall back to bare nouns/verbs (status, search, grep, compile, history), which are conventional but break the pattern.

Tool Count4/5

21 tools is on the heavy side, but the domain genuinely spans auth, project management, file CRUD, two search modes, structure inspection, compilation, and history, so most tools earn their place. A few (status, pin_projects, create_folder) are marginal conveniences that could be folded into others.

Completeness4/5

File lifecycle is fully covered (read, write, edit, move, delete, upload, download), plus projects, search, outline/section, compile and history diffs — no dead ends in core editing workflows. Gaps are minor: no delete_project or rename_project, and no way to set the tags that list_projects reports.

Maintenance

ActivityNo data
ResponsivenessOutdated data