You annotate a passage in the editor, the way you would for a proofreader. Your AI reads that comment through Sarmate's MCP server — with the exact excerpt and line it is anchored to — and edits the source. Nothing to copy, nothing to paste back, nothing to explain twice.
Connect your AI Try the editorIn the editor, highlight a passage and write what you want: “too easy”, “I need two questions using letters”, “the fractions touch the table rules”.
It calls read_comments on the MCP server. With no path, the tool says which files carry comments; with a path, it returns the full threads.
It knows which passage to rework, because the comment quotes it. It edits the file, compiles, and you read the PDF.
That is the whole difference with a chat. In an ordinary exchange you have to describe where to act — “the third exercise on page 12, the one about percentages” — and hope it lands. A comment is already attached to the right place: it carries the quoted excerpt and its line range.
And it stays attached when the text moves. If your AI rewrites the passage, changes the indentation or re-wraps the lines, the comment re-anchors on what it quotes rather than on a line number that has gone stale.
Each comment arrives with the excerpt it is attached to, its line range, its author and any replies — enough to act without asking anything further.
// The AI asks for a file's comments read_comments({ path: "Livres/EAM_1spe/p2_automatismes.tex" }) // What it gets back { "path": "Livres/EAM_1spe/p2_automatismes.tex", "count": 3, "comments": [ { "quote": "\item Soit $f(x) = 2x^{2} - 3x + 1$. ...", "line_start": 476, "line_end": 476, "author": "You", "body": "too easy", "replies": [] } ] }
On a maths textbook being written, six annotations left in four minutes, then a single call from the AI to read them all:
07:37 line 362 “the fractions touch the table rules” 07:38 line 380 “I need two questions using letters” 07:38 line 398 “slightly harder questions” 07:40 line 474 “Too easy. Give the area, ask for the radius” 07:41 read_comments → 6 comments
None of these sentences says where to act. None needs to: the comment is already in the right place.
A few minutes for the token, and your annotations turn into work done.
Follow the tutorial