update_annotation

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 →

update_annotation edits an existing annotation: its message, its position, its size, or any combination. Omitted parameters keep their current value. Get the id from get_annotations first. Example prompt: “Reword comment 3 to mention the new deadline”.

Tool description (as the AI agent sees it):

Updates an existing annotation’s message and/or bounding box, then saves the result back to storage. Supports PDF, DOCX, XLSX, PPTX, and 50+ more document and image formats. Call get_annotations first to retrieve the annotation ‘id’ and current values. Pass any subset of message/x/y/width/height — omitted parameters keep their current value. Call this tool whenever the user asks to edit, modify, move, or resize an existing annotation. Do NOT pre-check whether files exist — pass the filename the user provided directly. Returns a saved-path message (‘Updated annotation in ’). On failure, the response text starts with ‘Annotation update failed for’ followed by the underlying exception type, message, and inner-exception chain.

Parameters

NameTypeRequiredDescription
fileobjectyesThe document — see FileInput shape
idintegeryesAnnotation ID to update (from get_annotations)
messagestringnoNew message/comment text. Omit to keep current.
xintegernoNew X position. Omit to keep current.
yintegernoNew Y position. Omit to keep current.
widthintegernoNew width. Omit to keep current.
heightintegernoNew height. Omit to keep current.
passwordstringnoPassword for protected documents

Example call

{
  "name": "update_annotation",
  "arguments": {
    "file": {
      "filePath": "contract_annotated.pdf"
    },
    "id": 3,
    "message": "Deadline moved to 15 March \u2014 please confirm"
  }
}

Result

A message of the form Updated annotation <id> in <file> naming the saved document.

Pass only what changes: sending just message keeps the box where it was; sending x/y moves the annotation without touching its text.

On failure the text starts with Annotation update failed for, followed by the exception type and message.

Example prompts

  • “Reword comment 3 to mention the new deadline.”
  • “Move the annotation on page 2 down a little — it covers the table header.”
  • “Make annotation 5 bigger so it covers the whole clause.”