Skip to main content
Glama
leanzero-srl

MCP Document Processor

Official
by leanzero-srl

edit-doc

Edit an existing DOCX by appending, replacing, styling, or previewing changes while preserving original formatting, headers, footers, and images.

Instructions

Edit an existing DOCX. Actions: 'append' (XML-patches new content, PRESERVES original formatting/headers/footers/images), 'replace' (overwrites body but keeps section properties), 'style' (apply a stylePreset to existing paragraphs without changing text), 'preview' (show what would change). Always read-doc with mode 'indepth' first so you understand the existing structure.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
tagsNoTags for registry search and discovery.
styleNoAdvanced fine-grained style overrides.
titleNoOptional new title (used by 'replace').
actionYesEdit action.
tablesNoTables as 2D arrays.
docTypeNoTone and depth of the documentation.
categoryNoDocument category for the registry update.
filePathYesAbsolute or project-relative path to the existing DOCX file.
useLegacyNoDANGER: when true, recreates the document via mammoth which DESTROYS all original formatting (fonts, colors, images, headers, footers). Only set this if XML patching fails. Default: false.
paragraphsNoParagraphs to append or replace with.
stylePresetNoStyle preset. 'claude-like' (modern blue-accented professional) is the default for general-purpose docs. 'professional' is the executive serif look. Auto-selected from category if omitted.
addSeparatorNoIf true (default for 'append'), insert a blank paragraph before the new content as a visual separator.
Behavior5/5

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

With no annotations, the description fully carries the burden of disclosing behavior. It explains each action's effect: 'append' preserves formatting, 'replace' overwrites body but keeps section properties, 'style' applies preset without changing text, 'preview' shows changes. It also warns that useLegacy destroys original formatting when set to true.

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

Conciseness5/5

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

The description is concise, front-loading the main purpose and actions, then providing usage guidance. Every sentence adds value; no redundant or extraneous text.

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

Completeness4/5

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

Given the tool's complexity (12 parameters, nested objects, no output schema), the description covers the main actions and critical usage instruction. It doesn't explain return values or error handling, but the rules state output schema is not required. The description adequately prepares the agent for core usage.

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

Parameters4/5

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

Schema description coverage is 100%, so every parameter has a description. The description adds value by explaining the action parameter's effects and warning about useLegacy. However, it does not elaborate on all parameters beyond what the schema provides, but the baseline for high coverage is 3, and the additional context justifies a 4.

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

Purpose5/5

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

The description clearly states the tool edits an existing DOCX file, listing specific actions (append, replace, style, preview) that each have distinct effects. It distinguishes from sibling tools like read-doc, create-doc, edit-pptx, etc., by specifying it modifies existing DOCX files.

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

Usage Guidelines4/5

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

The description provides a strong usage guideline: 'Always read-doc with mode indepth first so you understand the existing structure.' This tells the agent when to use a prerequisite sibling. However, it does not explicitly state when NOT to use this tool or compare with alternatives like create-doc for new documents.

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/leanzero-srl/leanzero-mcp-doc-processor'

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