get_document_info

get_document_info returns the file type, page count, size, and per-page dimensions — the numbers you need before placing an area redaction. Example prompt: “How big is page 2? I need to cover the bottom third.”

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, images, 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 before redacting (e.g. to read page width/height before choosing redact_image_area coordinates). Do NOT pre-check whether the file exists — just pass the filename the user provided. Returns a JSON object with fields fileName, fileType, pageCount, size, and pages (array of { number, width, height }). On failure, the response text starts with ‘Document-info lookup failed for’ followed by the underlying exception type, message, and inner-exception chain.

Parameters

NameTypeRequiredDescription
fileobjectyesFileInput shape
passwordstringnoPassword for protected documents

Example call

{
  "name": "get_document_info",
  "arguments": {
    "file": {
      "filePath": "case-file.pdf"
    }
  }
}

Result

A JSON object with fileName, fileType, pageCount, sizeBytes, and pages (width and height per page).

Per-page dimensions turn “cover the bottom third of page 2” into concrete x/y/width/height values for redact_image_area.

On failure the text starts with Document-info lookup failed for, followed by the exception type and message.

Example prompts

  • “How many pages, and how big is each one?”
  • “What are the dimensions of page 2?”
  • “Is this a PDF or a Word document?”