get_document_info returns the file type, page count, and format-specific structure without changing anything — the sensible check before watermarking a batch. Example prompt: “How many pages will this watermark cover?”
Tool description (as the AI agent sees it):
Returns the file type, page count, and format-specific properties of a document as JSON. Supports PDF, DOCX, XLSX, PPTX, PNG, JPG, and 50+ more document and image formats. Call this tool whenever the user asks about the structure of a document — page count, dimensions, file type — without modifying it. Useful as a precondition check before AddWatermark / SearchWatermarks (e.g. ‘how many pages does this PDF have?’). Do NOT pre-check whether the file exists — just pass the filename the user provided. Returns a JSON object with fields fileType (engine-reported format name), fileFormat (extension), size (bytes), pageCount, and pages (array of { number, width, height } per page). On failure, the response text starts with ‘Document-info lookup failed for’ followed by the underlying exception type, message, and inner-exception chain.