export_pdf
Convert a local .docx to PDF using Microsoft Word, returning the PDF path, SHA-256 hash, and page count without modifying the source file.
Instructions
Render a local .docx to PDF via Microsoft Word and report its page count.
output_path must fall inside VERIFIED_DOCX_MCP_ALLOWED_FILE_ROOTS (defaults to the user's home directory), must not resolve to a credential path, and its parent directory must already exist. This is a read/render tool: the source .docx is never modified (Word opens a private staged copy — see render.py), so the return value has no "applied" key.
Returns pdf_path, sha256, page_count (best-effort; None — never a guessed 0 — when it cannot be determined), page_count_source ("word"|"pdfinfo"|"regex"|None), engine ("word"; the only engine, D2: no LibreOffice), and left_open_document (the rendered document's window title in Word — see render.py's module docstring for why it is never auto-closed).
Errors:
INVALID_INPUT - a bad path or output_path
RENDER_ENGINE_UNAVAILABLE - no render engine available (Word only)
AUTOMATION_NOT_GRANTED - macOS declined Automation control of Word
for this app; run verified-docx-mcp doctor for the fix, scoped to the app
hosting this MCP server's own process
WORD_SANDBOX_UNAVAILABLE - Word has never been launched on this
machine (its sandbox container does not
exist yet)
RENDER_FAILED - any other Word automation failure
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | ||
| output_path | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||