Skip to main content
Glama

r7_edit

Edit or delete a specific paragraph in a DOCX document, preserving its section breaks, list numbering, and character formatting.

Instructions

Edit, update text, style, or remove a specific paragraph in a DOCX document. The paragraph keeps its own properties (section break, list numbering, spacing) and the new text inherits the previous first run's formatting unless you ask for different formatting.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
styleNoParagraph style name (e.g. Normal, Heading1, Heading2).
newTextNoNew text content for the paragraph.
filePathYesPath to the DOCX document.
formattingNoCharacter formatting for the new text: { bold, italic, underline, strike, family, size, color, highlight }.
outputPathNoOptional target path (defaults to overwriting in-place).
paragraphIndexYes0-based index of the target paragraph (from r7_inspect/r7_read).
deleteParagraphNoSet true to delete this paragraph.
preserveFormattingNoKeep the paragraph's existing character formatting on the new text (default true).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.1

TDQS

A3.8/5.0
Behavior4/5

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

No annotations are provided, so the description carries the full load, and it does disclose meaningful behavior: the paragraph retains its own properties (section break, list numbering, spacing) and the new text inherits the previous first run's formatting unless overridden. It omits the destructive/overwrite implications of deleteParagraph and the in-place default write, which the schema alone covers.

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?

Two sentences with no waste; the core action is front-loaded and the second sentence adds only genuinely new preservation semantics.

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?

For an 8-parameter, mutation-capable tool with a nested formatting object and no annotations or output schema, the description covers the key behavioral contract (formatting inheritance, property preservation, removal). It leaves the in-place write default and delete semantics to the schema, which is a minor gap.

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 baseline is 3. The description clarifies the preserveFormatting/formatting interplay ('inherits the previous first run's formatting unless you ask for different formatting'), which adds slight meaning, but it does not explain paragraphIndex sourcing beyond what the schema already states.

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?

States a specific verb set (edit, update, remove) and a precise resource (a specific paragraph in a DOCX document). An agent can tell this is the in-place paragraph editor rather than a document-wide replace, though the description never names the likely sibling alternatives (r7_replace, r7_insert).

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

Usage Guidelines3/5

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

Usage is only implied: 'a specific paragraph' suggests targeting by index, and 'remove a specific paragraph' hints at the delete case. There is no explicit when-to-use/when-not guidance and no routing to the closest siblings (r7_replace for text substitution, r7_insert for adding content).

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