get_document_info returns the file type, page count, size, and per-page dimensions without modifying anything. It is the natural precondition check: how many pages are there, and are these files even the same format? Example prompt: “How many pages does each of these have?”
Tool description (as the AI agent sees it):
Returns the file type, page count, size, and per-page dimensions of a document as JSON, without modifying the file. Supports PDF, DOCX, XLSX, PPTX, and 30+ more document formats. Call this tool whenever the user asks to inspect a document, check its page count, or get its details — useful as a precondition check before Merge or Split (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 fileName, fileType, fileFormat, extension, pageCount, size, and pages (array of { number, width, height, visible }). On failure, the response text starts with ‘Document-info lookup failed for’ followed by the underlying exception type, message, and inner-exception chain.