Skip to main content
Glama

insert_paragraph

Destructive

Insert a paragraph before or after a specific paragraph in DOCX, ODT, or Google Docs while preserving formatting; DOCX edits emit tracked changes.

Instructions

Insert a paragraph before/after an anchor paragraph by paragraph id. Supports DOCX, ODT, and Google Docs. (ODT paragraph ids are positional and shift after insertion — re-read before further edits.) Surface: revisionable — DOCX insertions emit native OOXML tracked changes.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
positionNo
file_pathNoPath to the DOCX or ODT file.
new_stringYes
instructionYes
google_doc_idNoGoogle Doc ID or URL (alternative to file_path). Extract from URL: docs.google.com/document/d/{ID}/edit
style_source_idNoParagraph anchor to clone formatting (pPr and template run) from instead of the positional anchor. Accepts a `_bk_*` ID, or (DOCX only) any other bookmark name whose w:id-paired range covers exactly that one paragraph. Falls back to anchor with a warning if not found.
positional_anchor_node_idYesAnchor paragraph. Accepts a safe-docx `_bk_*` id, or (DOCX only) any other bookmark name — e.g. a host application's own stable paragraph bookmark — whose w:id-paired range covers exactly this one paragraph. Exact name match; a point bookmark or a multi-paragraph range is refused.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv0.21.2
    • addedInput schema / properties / positional_anchor_node_id / description
      Added value: +"Anchor paragraph. Accepts a safe-docx `_bk_*` id, or (DOCX only) any other bookmark name — e.g. a host application's own stable paragraph bookmark — whose w:id-paired range covers exactly this one paragraph. Exact name match; a point bookmark or a multi-paragraph range is refused."
    • changedInput schema / properties / style_source_id / description
      Previous value: -"Paragraph _bk_* ID to clone formatting (pPr and template run) from instead of the positional anchor. Falls back to anchor with a warning if not found."New value: +"Paragraph anchor to clone formatting (pPr and template run) from instead of the positional anchor. Accepts a `_bk_*` ID, or (DOCX only) any other bookmark name whose w:id-paired range covers exactly that one paragraph. Falls back to anchor with a warning if not found."
  2. Changed1 schema field changedv0.12.1
    • changedInput schema / properties / file_path / description
      Previous value: -"Path to the DOCX file."New value: +"Path to the DOCX or ODT file."
  3. First observed

TDQS

A3.9/5.0
Behavior4/5

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

Annotations already flag readOnlyHint=false and destructiveHint=true, so the mutation profile is known; the description adds genuinely useful context beyond that: DOCX insertions emit native OOXML tracked changes (revisionable surface) and ODT paragraph ids are positional and shift after insertion. It does not state permission/auth requirements or whether the operation can be undone outside tracked changes.

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

Conciseness4/5

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

Three tight sentences with the core action front-loaded, followed by supported surfaces and then caveats. The parenthetical ODT warning and tracked-changes note both earn their place; no redundant filler.

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 a 7-parameter mutation tool with no output schema and only a destructive hint in annotations, the description covers supported formats, the id-shifting hazard, and tracked-changes behavior. It leaves the required 'instruction' parameter and any auth requirements for Google Docs unexplained, so it is strong but not fully complete.

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 coverage is 57%, with the two most consequential parameters (positional_anchor_node_id and the enum position) already documented in the schema, and the description reinforces the anchor/position relationship. Two required parameters, new_string and instruction, have no explanation in either the schema or the description, so the description does not fully compensate for the coverage gap.

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 names a specific verb (insert) and resource (paragraph) and pins down the mechanism: before/after an anchor paragraph identified by paragraph id. This clearly separates it from sibling tools like replace_text or insert_section_break, which operate on different targets.

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?

The use case is implied by 'insert a paragraph before/after an anchor paragraph,' and the ODT caveat tells the agent to re-read before further edits. However, there is no explicit when-to-use/when-not guidance and no reference to alternatives such as replace_text or batch_edit for related edits.

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