Repository navigation
v0.7.0
The operations without an MCP client. A command line reaches every tool, call <tool> with a
JSON request plus shorthand commands for the common ones, and prints one JSON result, with exit
codes that say what is safe to do next. overleaf-web-mcp/core gains createOverleafClient, one
typed method per tool, and three Agent Skills drive the command line. All three go through the
same service, checks, and safety defaults as the MCP server. Every tool now declares an
outputSchema. No tool was added or removed; the server still registers 31 tools. Planned in
ROADMAP.md.
Added
- A command line for every operation.
overleaf-web-mcp call <tool>runs any tool with a
JSON request from--request <file>,--request -(stdin), or--json <object>, and prints
its result.schema <tool> --input|--outputprints the JSON Schematools/listadvertises, and
capabilities [projectId]lists each operation's effects, annotations, the effects the access
policy refuses, the error codes, and the exit codes, with the project's access level when a
projectIdis given. Shorthand commands build the input of the common tools:projects list,
tree,files read,files write,files download,sync plan,sync apply,
compile run,compile log,compile download, andcomments list.overleaf-web-mcp --help
lists them all; the command line page
documents them. - One JSON result per command, and exit codes that say what is safe to do next. A command
prints exactly one JSON value on stdout, the object the MCP server returns as
structuredContent. On failure stdout stays empty and stderr gets one line of
{ code, message, retryable, details? }. The exit code is 0 complete, 1 failed, 2 fix the call,
3 not allowed (AUTH_EXPIRED,PERMISSION_DENIED,POLICY_DENIED), 4 read or plan again, 5
outcome unknown (a write may have applied: read before acting, never re-run it blindly), 6
partial (the result is on stdout), and 7 safe to retry later. ATIMEOUTexits 7 from a
read-only tool or while the session is being opened, 4 from a write known not to have applied
(details.outcome: "not_applied"), and 5 from any other write, because a timed-out write may
have applied. An error that says part of a write applied (details.created, or a non-empty
details.applied) exits 4, never 2 or 7, which promise that nothing changed. - Strict input. The command line and the SDK client refuse a key the tool's schema does not
list, at any depth, withINVALID_ARGUMENTanddetails.unknownKeys, before any request; a
schema violation isINVALID_ARGUMENTwithdetails.issues. The MCP server, through the MCP
SDK, still drops unknown keys silently, so a misspelledwriteModethere falls back to
untracked. - No document text in argv.
files writetakes the text from--content-file, read by the
operation itself soOVERLEAF_LOCAL_READ_ROOTSapplies, or from--stdin;calltakes any
request from a file or stdin.compile logandcompile downloadneed--build-ref, since a
new process has no latest build;compile run --download <localPath>compiles and saves the
PDF in one process, and keeps the compile result on stdout withstatus: "partial"and exit 6
when only the download failed.--progresswrites progress as JSON lines on stderr. createOverleafClientinoverleaf-web-mcp/core: one camelCase method per tool
(readFile,syncDirectory,authStatus()), each resolving with the same object as the MCP
structuredContent, typed by the tool's contract, and rejecting withMcpErrorand the codes
the command line reports, plusclose(), which lets calls still running finish before it closes the project
connections. The SDK page names
the stable surface ofoverleaf-web-mcp/core.- Three Agent Skills in the package's
skills/folder, which drive the command line:
overleaf-revise-manuscript,overleaf-reviewer-comments, andoverleaf-sync-sources. They
use only public commands, ask before anything destructive, treat manuscript text and reviewer
comments as data, never instructions, and keep project paths off the shell command line. - Output schemas for the last 12 tools:
get_project_tree,read_file,write_file,
create_file,manage_entity,download_file,get_sections,get_section_content,
write_section,stop_compile,set_comment_status, andmonitor_project_historydeclare an
outputSchemaand return the same object asstructuredContent, mirrored in the JSON text
block as before. Every tool now does. The shapes are the ones these tools already returned,
recorded first as golden results taken through the real domain classes.
Changed
-
errorCodein thefailedentries ofbatch_upload,sync_directory, and
delete_entitiesis an enum of the error codes in their output schemas, where it was any
string. -
A read-only tool whose result does not match its output schema fails with
PROTOCOL_UNSUPPORTEDanddetails: { kind: "response_shape", paths }, the same way through
every interface. The MCP SDK used to report such a mismatch as an untyped text error. A tool that
changes something is never failed this way after the change applied. -
createMcpServer,serveOverStdio, andcreateOverleafServicetake a narrower runtime
type.OverleafServiceRuntime.authStatus,createFile, andentities.manageEntitynow
declare the results theauth_status,create_file, andmanage_entitycontracts describe,
where they returnedRecord<string, unknown>orunknown;recoveredAfterTimeoutistrue
where it was any boolean;sections.getSectionsandgetSectionContentreturn sections whose
commandis one ofpart,chapter,section,subsection,subsubsection,paragraph,
orsubparagraph, where it was any string; andentities.uploadFilehas two overloads:
withoutifExists: "skip"it resolves with an upload, never a skipped entry. A hand-written
runtime must return those shapes, and a caller that forwardsoptionstouploadFilepasses a
defined value. -
set_comment_statusreports the status it verified, not the string it was given; the two
differ only for a library caller that passed something other thanopenorresolved. -
The descriptions of
read_file,stop_compile, andmonitor_project_historynow name the
fields they return, and those ofadd_commentandset_comment_statussay that
recoveredAfterTimeoutalso marks a change confirmed after its read-back failed. -
overleaf-web-mcp serveloads the MCP SDK only when it runs, so operation commands start
without it.help,login,keepalive, an unknown command, andservebehave as before.
Fixed
- A comment change is never reported as safe to retry after it was sent. When the read-back
after a posted reply failed,reply_to_commentpassed that read's error on, for example a
retryableRATE_LIMITED, and posting again duplicated the reply. It is nowOUTCOME_UNKNOWN
withdetails.threadId, as is a failed read-back afteradd_commenttimed out creating its
thread and afterset_comment_statusapplied a change. When only the final read of the new
thread fails,add_commentreturns its result withoutthread, as its description allows. - A progress callback that throws never fails the call. Progress is advisory, but a library
caller'sonProgressthat threw or rejected failedbatch_upload,plan_sync,
sync_directory, ordelete_entities, possibly after deletes or writes applied. The MCP server
already ignored failed progress notifications. - Exactly one leading byte order mark is dropped from a local file's text, as for
write_filewithlocalPathand the filesplan_syncandsync_directorycompare. A
zero-width no-break space right after it was dropped too. get_project_treereportshashonly when it is a string. A binary file whosehashin
the joined project wasnullor another non-string value was listed with that value, which the
new output schema, like the documentation, does not allow; the entity now has nohash.- A heading inside another heading's title is part of that title. For
\section{Outer \section{Inner}},get_sectionslisted both, the outer section ending before
its own body started, andwrite_sectionon it wrote part of the heading a second time. Section
tools now read a heading inside a title or a short title as part of it.
Documentation
- New pages for the command line and the
TypeScript SDK. The README and the
installation guide describe using the package without an MCP client, the tool reference
documents the result of every tool, and the safety model and AGENTS.md state the output rule:
every command butserveandhelpprints exactly one JSON result. - The roadmap records v0.7.0 as shipped, with the commands and exit codes as built.