Powering Actions in Word with Model Context Protocol
.png)
LegalTech teams in 2025 battle with the same fundamental challenge: how do you bridge the gap between sophisticated AI capabilities and the complex world of legal documents and Microsoft Word? The answer came through Model Context Protocol (MCP) and a deep understanding of document architecture that we've refined over years of building Definely's core engine.
Today, Definely's AI agents can seamlessly query document structures, insert definitions with proper formatting, and maintain the precise ordering that legal documents require - all while working directly within Microsoft Word. This capability transforms how lawyers interact with complex documents, turning multi-step manual processes into single, intelligent actions.
In this post, we'll explore how MCP enables this functionality, the architectural decisions we made, and the unique advantages of combining battle-tested document processing with modern AI agent frameworks.
What Makes MCP Different from Traditional APIs
MCP is a relatively new technology (first introduced by Anthropic in November 2024) that came into existence because, to quote one of our lead engineers, “humans love being lazy”.
MCPs represent a paradigm shift in how AI agents interact with external services. Unlike traditional APIs that require rigid and formal specifications designed and maintained by human developers, MCP creates self-describing interfaces that agents can discover and use dynamically.
Traditional API development follows a predictable pattern: define endpoints, document parameters, version carefully, and hope existing implementation doesn't break when you make changes. This approach creates friction when building for AI agents.
MCP inverts this model. Instead of static contracts, it provides real-time capability discovery. When an agent connects to an MCP server, it receives an up-to-date specification of available tools and their current parameters. This is analogous to a human developer writing the other side of the API call dynamically in real time. What this means for software development is that we can now iterate rapidly on our tools without breaking existing installations - a critical advantage when developing AI-powered features.
The flexibility extends beyond just avoiding breaking changes. We can adjust parameter names, modify tool implementations, and even change how tools behave based on performance data, all while maintaining compatibility with deployed agents.
Solving the Local Document Challenge with Our Proprietary Technology
Most MCP servers run as cloud services, which works well for many use cases on the web. However, Definely works directly within Microsoft Word. This provided both an opportunity and a challenge.
The fact that Definely runs directly within Microsoft Word, with code executing locally on the user's machine presented a unique opportunity. We could create an MCP service that gives AI agents direct access to modify documents in real-time.
Nonetheless, working with Microsoft Word presents significant technical challenges. Word documents use Office Open XML (OOXML), a verbose and complex format where even simple formatting can be represented in multiple ways. For example, there are a thousand different ways to apply a heading styling within Word. Nested lists, proper text styling, and maintaining document structure require careful handling that large language models struggle with when working directly with XML.
Definely's advantage in this context comes from years of solving these exact problems. At Definely, we've spent years building sophisticated document processing capabilities. Our proprietary technology that powers Draft extracts detailed structural information from legal documents, identifying terms, clauses, definitions, and their relationships.
This means that when MCP agents need to make document modifications, they're leveraging battle-tested functionality rather than attempting to manipulate complex XML structures directly. Our document processing engine handles the intricacies of OOXML insertion, formatting preservation, and structural maintenance.

The Engineering Path Forward
Although our tried and tested proprietary technology provides a competitive edge in the market, we are learning from the evolving landscape of legal AI and innovating.
Recent developments in the AI document editing space have highlighted the effectiveness of text-based document representations. Rather than having agents work directly with complex structured formats, this approach involves:
- Converting documents into clean, text-based representations
- Allowing agents to make bulk edits to the text version
- Algorithmically converting those changes back into properly formatted document modifications
Therefore, implementing the text document model requires solving the bidirectional translation challenge. Converting structured documents to text may be straightforward, but translating agent modifications back into properly formatted Word documents requires sophisticated engineering.
This involves:
- Mapping text edits to specific document locations
- Preserving formatting and styling context
- Maintaining list structures and numbering
- Handling cross-references and internal document relationships
The upfront engineering investment may be significant, but we believe the result is a highly reliable system that can support increasingly sophisticated document modifications.
Combining Algorithmic Precision with AI Flexibility
What makes Definely's approach unique is the combination of rigorous algorithmic document understanding with AI agent flexibility. Our Draft technology provides the structural foundation by identifying definitions, clauses, and document relationships with high precision. MCP then allows AI agents to leverage this foundation while making intelligent decisions about content and modifications.
This hybrid approach means agents can ask sophisticated questions about document structure, find relevant clauses in the Vault, and make contextually appropriate modifications.
The legal profession demands reliability and precision. Documents must maintain their formatting, legal relationships must be preserved, and changes must be predictable. By grounding our AI capabilities in proven document processing technology and using MCP's flexible interface model, we can iterate rapidly while maintaining the reliability that legal professionals require.
Our experience suggests that successful AI document tools require both sophisticated understanding of document architecture and flexible interfaces for AI interaction. MCP provides the interface layer, while deep domain expertise in document processing provides the foundation for reliable, professional-grade functionality.
As we continue developing these capabilities, we're seeing how the combination of MCP's flexibility and Definely's document processing expertise creates new possibilities for AI-powered legal work and transform complex document tasks into intuitive, intelligent interactions.