Give your AI agent hands to operate real Word & WPS documents on Windows — an MCP server driving real Office apps via COM.
DocuHand demonstrates solid tool design with clear verb-noun naming (convert_documents, inspect_document, fill_template, export_pdf, extract_content, edit_open_document, merge_documents). All 7 tools have detailed descriptions (150-300 chars each) explaining WHAT they do, WHEN to use them, and key prerequisites. Input schemas are present with typed parameters and descriptions. However, output schemas are not documented in the visible code, the tool definitions show input parameters but no explicit return type documentation. Error handling descriptions mention 'structured error' and 'llm_hint' but the actual error response format is not visible in the source. Parameter constraints are well-described (e.g., to_format enum values, page_range format), but some lack formal enum declarations in the schema. The server shows production-grade intent (CJK font handling, fallback engines, per-item failure isolation) but lacks explicit output schema documentation and formal error classification patterns.
Batch-convert every .doc/.docx file in a directory in ONE call. Drives the real Word/WPS engine per file (Word first, WPS fallback when Word is absent or crashes). Files already in the target format are reported as already_target and left untouched; other extensions are ignored. Sources are NEVER deleted. One unreadable file fails alone with a structured error instead of killing the batch; only a total engine-launch failure aborts the run.
Edit a document the user has OPEN in Word/WPS right now. Attaches to the user's running instance (not a hidden copy), finds the document by absolute path or window title, and applies small operations in order. The user SEES the changes happen in their window — this is the only Office MCP capability that works on live, locked files.
Export a print-fidelity PDF using the real Word/WPS layout engine. The PDF matches what would come out of the printer — not a re-layout by a converter library. Works on legacy .doc files and preserves CJK pagination. The source document is opened read-only and never modified.
Extract text, tables or the heading outline from a Word document. Reads legacy .doc binaries that XML libraries cannot open, in a hidden READ-ONLY Word/WPS instance.
Fill a Word template with data and save a NEW document. Produces template_filled.<ext> next to the template by default (the template itself is never modified). Fill mechanisms, tried in 'auto': content controls (Tag/Title = key), bookmarks (name = key), and literal {{key}} placeholder tokens. Layout and East-Asian fonts are protected through the fill (NameFarEast re-assertion before AND after save).
Output schemas not documented. Tool descriptions mention return types (e.g., 'structured JSON', 'per-item success/failure') but no explicit schema definitions visible in source code. LLMs cannot plan downstream tool calls without knowing what fields to expect.
Parameter enums not formally declared in schema. to_format, mode, what, and overwrite accept constrained values but descriptions use prose ('"docx" (recommended) or "doc"') rather than JSON Schema enum arrays. LLMs may hallucinate invalid values.
Error handling guidance incomplete. Server.py mentions 'llm_hint' in instructions but actual error response structure not visible. No explicit error classification (retryable vs user-fixable vs fatal) documented in tool descriptions.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-23 | C | 63 | 2026-07-28+ | v2 |
Health-check a Word document before touching it. Opens the document READ-ONLY in a hidden Word/WPS instance and reports: true format vs extension (catches renamed or pseudo-.doc files), page / word / paragraph counts, lock state (file currently open elsewhere), corruption suspicion, password protection, protection mode, bookmarks and field codes. Works on legacy .doc binaries that XML libraries cannot read, and on files currently open in Word/WPS.
Mail-merge style batch generation: one template × N data rows. Generates one filled document per row into output_dir (default: merged_<template-stem>/ next to the template). Rows fail in isolation — one bad row never stops the batch. Name outputs with {i} (1-based row, zero-padded) and any {field} tokens; names are sanitized.
edit_open_document operations parameter uses free-form array of objects. No schema for operation objects (op, find, replace, text, where, save). LLMs must infer valid operation shapes from description text alone.
No pagination or result-limiting guidance. convert_documents and merge_documents process multiple files but no mention of batch size limits, result caps, or how to handle thousands of files. Large batches could exhaust context or cause timeouts.