# get_document_info The get_document_info MCP tool returns file type, page count, size, and per-page dimensions — useful for placing an area redaction accurately. `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 many pages, and how big is each one?"* It only reports; it does not choose where to redact. **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 | Name | Type | Required | Description | |---|---|---|---| | `file` | object | yes | The document — see [FileInput shape]({{< ref "redaction/mcp/tools-reference/_index.md#the-fileinput-shape" >}}) | | `password` | string | no | Password for protected documents | ## Example call ```json { "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 help you work out concrete `x`/`y`/`width`/`height` values for [`redact_image_area`]({{< ref "redaction/mcp/tools-reference/redact-image-area.md" >}}), which takes no page argument — the rectangle applies to the file, so check every page of the output. 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 each page?"* * *"Is this a PDF or a Word document?"*