How to run a document review cycle with an AI agent

View as MarkdownMarkdown

Set up your AI agent

Give your coding agent live access to the GroupDocs documentation and API reference through the GroupDocs Docs MCP server — no install, no API key. Learn more

claude mcp add --transport http groupdocs-docs https://docs.groupdocs.com/mcp

Also process documents locally

The GroupDocs.Annotation MCP server lets your agent work with files on your machine; they are never uploaded. It needs the .NET 10 SDK or Docker.

claude mcp add groupdocs-annotation -- dnx GroupDocs.Annotation.Mcp --yes
Folders, licensing and more →

A review round is rarely “add a comment”. It is: what is still open, who raised it, answer it, resolve it, and produce a clean copy for the next audience. All five are tool calls.

Note
The commands and config snippets on this page are for the .NET build of the server — the only platform available today. Installation and client setup: MCP server for .NET. Other platforms will expose the same tools with their own launch command; everything else on this page applies unchanged.

Before you start

Set GROUPDOCS_MCP_OUTPUT_PATH to a folder other than the storage folder before chaining edits on a produced file (configuration). With the default — outputs land in the storage folder — the second write fails with being used by another process; with a separate output folder add_reply, update_annotation and remove_annotations on the produced file all succeed. File names below (contract_annotated.pdf) mean the produced file in the output folder.

1. What is open?

List the annotations in contract_annotated.pdf (in the output folder). Which ones have no replies?

get_annotations returns every annotation with its id, author, page, message, and replies. “Unanswered” is just an empty replies array — the agent filters the list it already has, without re-reading the document.

2. Answer in threads

Reply to Maria’s comment that finance approved the terms on 12 March. Sign it as Alex.

add_reply takes the annotationId from step 1, the comment, and a userName. Supply the name: a thread without authors cannot be filtered later, and remove_replies can clean up by author only if the author was recorded.

3. Resolve what is done

There is no “resolved” flag in the model — resolution is a convention you choose:

  • Reply and leave it — the thread is the audit trail; nothing is deleted.
  • Remove the annotation — remove_annotations by id once an issue is closed, keeping only open points.
  • Edit the message — update_annotation to prefix [RESOLVED], which keeps the history visible in any viewer.

Pick one and tell the agent which: “mark resolved by prefixing the message, do not delete anything” is a perfectly good instruction.

4. Carry the round to the next draft

The document changes; the comments should not be lost:

Export the annotations from the reviewed copy, then import them into contract-v3.pdf.

export_annotations writes an XML file; import_annotations merges it into the new draft. Coordinates carry over as-is, so on a re-flowed document a note may land near rather than exactly on its original text — worth a preview pass afterwards.

The same pair merges two reviewers’ copies into one.

5. Hand back something clean

Remove all annotations and give me a clean copy for the counterparty.

remove_annotations with no ids clears everything into a new file. Ask the agent to confirm the count before it runs — this is the one call in the workflow with no undo.

Keeping the trail honest

Two habits make this workflow trustworthy:

  • Always name the file you mean. Each step writes a new file into the output folder; the agent should pass the previous result forward, not the original.
  • Check the licence before a formal review. In evaluation mode every page carries a trial badge, which is not something to send to a counterparty — get_license_status answers in one call.

Read more