search_watermarks reports the watermarks a document already carries. It is the call to make before promising to remove anything — it distinguishes a real watermark object from text baked into the page. Example prompt: “Does this document have a watermark, and what does it say?”
Tool description (as the AI agent sees it):
Searches for watermarks in a document and returns their details as JSON. Supports PDF, DOCX, XLSX, PPTX, PNG, JPG, and 50+ more document and image formats. Call this tool immediately whenever the user asks to search for watermarks, find watermarks, list watermarks, or check if a document has watermarks. Do NOT pre-check whether files exist — just pass the filename the user provided. Returns a JSON object with fields count (number of watermarks found) and watermarks (array with type (“text”|“image”), text, page, x, y, width, height, rotateAngle per watermark). On failure, the response text starts with ‘Search failed for’ followed by the underlying exception type, message, and inner-exception chain.
A JSON array describing each watermark the engine can identify.
An empty result on a document that visibly shows “DRAFT” is informative, not a failure: it means the mark is part of the page content rather than a watermark object, and remove_watermarks will not be able to take it out.
On failure the text starts with Watermark search failed for, followed by the exception type and message.