Skip to main content
Glama

convert_docx_to_pdf

Convert DOCX files to PDF while preserving Word formatting. Add watermarks or QR codes as needed for document processing workflows.

Instructions

Enhanced DOCX to PDF conversion with perfect Word style replication and Playwright integration. Watermark can be added by setting addWatermark=true (uses WATERMARK_IMAGE environment variable or default text "doc-ops-mcp"). QR code can be added by setting addQrCode=true (requires QR_CODE_IMAGE environment variable). Output directory is controlled by OUTPUT_DIR environment variable. Files will be automatically saved to OUTPUT_DIR with auto-generated names.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
docxPathYesDOCX file path to convert
preserveFormattingNoPreserve original formatting
chineseFontNoChinese font family to useMicrosoft YaHei
addWatermarkNoAdd watermark to PDF (uses WATERMARK_IMAGE environment variable or default text "doc-ops-mcp")
addQrCodeNoAdd QR code to PDF (requires QR_CODE_IMAGE environment variable)
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries full burden. It discloses that files are automatically saved to OUTPUT_DIR with auto-generated names, which is useful behavioral context. However, it doesn't mention error handling, performance characteristics, or what happens if environment variables are missing, leaving gaps for a mutation tool.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is appropriately sized with three sentences that efficiently cover conversion purpose, optional features, and output behavior. It's front-loaded with the core functionality, though some repetition with schema details slightly reduces efficiency.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 5-parameter mutation tool with no annotations and no output schema, the description is moderately complete. It covers the conversion process and output location but lacks details on error cases, return values, or integration with sibling tools, leaving room for improvement.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema already documents all 5 parameters thoroughly. The description adds minimal value by repeating some parameter details (e.g., watermark/QR code environment variables) but doesn't provide additional semantic context beyond what's in the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool converts DOCX to PDF with style replication and Playwright integration, which is a specific verb+resource. However, it doesn't explicitly distinguish from sibling tools like 'convert_document' or 'convert_markdown_to_pdf', which appear to handle different conversion types.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description mentions watermark and QR code capabilities but provides no guidance on when to use this tool versus alternatives like 'add_qrcode' or 'add_watermark' standalone tools. It lacks explicit when/when-not instructions or prerequisites for effective use.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Tele-AI/doc-ops-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server