remove_replies

remove_replies removes replies in one of three modes: specific replyIds, everything by one userName, or — with neither set — all replies in the document. Example prompt: “Remove my replies before I send this on”.

Tool description (as the AI agent sees it):

Removes replies from annotations and saves the result back to storage. Supports PDF, DOCX, XLSX, PPTX, and 50+ more document and image formats. Filter mode: pass ‘replyIds’ (comma-separated) to remove by reply ID, OR pass ‘userName’ to remove all replies from one user. Pass neither to remove ALL replies in the document. Call this tool whenever the user asks to delete a reply, remove a comment thread, or clear replies from one author. Do NOT pre-check whether files exist — pass the filename the user provided directly. Returns a saved-path message (‘Removed N reply / replies from ’). On failure, the response text starts with ‘Reply removal failed for’ followed by the underlying exception type, message, and inner-exception chain.

Parameters

NameTypeRequiredDescription
fileobjectyesFileInput shape
replyIdsstringnoComma-separated reply IDs to remove, e.g. ‘12,34’. Omit to fall back to userName / remove-all.
userNamestringnoRemove all replies authored by this user name. Mutually exclusive with replyIds.
passwordstringnoPassword for protected documents

Example call

{
  "name": "remove_replies",
  "arguments": {
    "file": {
      "filePath": "contract_annotated.pdf"
    },
    "userName": "Alex"
  }
}

Result

A message of the form Removed N reply / replies from <file>, naming the saved document.

The three modes are mutually exclusive in practice: pass replyIds or userName or neither. Passing neither is the destructive one — it clears every thread in the document.

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

Example prompts

  • “Remove my replies before I send this on.”
  • “Delete replies 12 and 34.”
  • “Clear all reply threads but keep the annotations themselves.”