Evals & Deep Dives
Safe-DOCX: MCP for Microsoft Word (DOCX)
Evaluation scenarios from implementing TypeScript-native DOCX editing primitives — illustrated with fixtures, expected results, and tests drawn from the package's own traceability suite.
Accept Tracked Changes
-
Accept moves by keeping destination and removing source
A test scenario for acceptChanges — a paired OOXML move keeps the destination text and removes the source text.
Layout
-
Table cell padding container creation
When applying padding to selected Word table cells, the document mutation must create the required cell-property containers without adding margin containers to untargeted cells.
-
Missing index reporting for table row height
When applying row-height rules to selected Word tables, invalid table or row references are reported as skipped selections.
Parsing Heuristics
-
Multi-character Roman numeral list labels
When classifying text-formatted list labels in legal documents, multi-character Roman numerals need a distinct list-label type.
-
Parenthesized letter label extraction
When parsing agreement paragraphs that use typed list labels, the leading marker must be separated from the paragraph content before classification can proceed.
-
Null label for plain paragraph text
Plain paragraph list-label parsing records that ordinary paragraph text has no explicit list label.
-
List label removal with leading whitespace
When preparing legal-document list text for comparison, a leading list label can be stripped while preserving the item wording that follows.
Text Matching
-
Exact match for a literal substring
A test scenario for the baseline successful case of findUniqueSubstringMatch — a search string that appears once, verbatim, inside a paragraph's plain text.
-
Flexible whitespace match across spacing variance
When locating a defined phrase in document text, flexible whitespace matching preserves a unique substring match even when spacing differs between the source text and the search phrase.
-
Quote-normalized match across quote styles
When locating a defined term in paragraph text, quote normalization allows different quote styles to describe the same substring.
XML Parsing
-
Element structure preservation through XML round-trip
When round-tripping XML content, serialized output needs to preserve the element names, attributes, and text that carry document meaning.
-
Concatenated Text Content For Nested XML Elements
When reading visible XML text from a parsed document element, concatenated text content preserves descendant text in document order.