Skip to main content
Glama

Document Insert Paragraph Before

document_insert_paragraph_before
Destructive

Use this to insert a new paragraph before an identified matching paragraph in a specified local document. Check the match and the text before writing.

Input Schema

NameRequiredDescriptionDefault
pathYesExisting .docx path, or the new document destination when create=true.
textYesParagraph text to append/prepend/insert.
createNoCreate a new DOCX at path. Fails if path already exists; do not combine with output.
deviceYesReMCP device id returned by list_devices. Required for every device operation.
outputNoOptional output .docx path when editing an existing document.
searchYesParagraph text substring for replace/insert/delete operations.

Output Schema

NameRequiredDescriptionDefault
dataNoEdit DOCX document structured result for edit_document. Stable fields are declared explicitly; platform-specific fields may be added. Large results may return truncated/bytes/preview instead of the full payload.
textYesConcise human-readable result of the tool call.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A3.6/5.0
Behavior3/5

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

Annotations already declare destructiveHint=true, idempotentHint=false, and readOnlyHint=false, so the safety profile is available structurally. The description adds a useful caution to verify the match and text before writing, but it does not explain what happens to existing content, failure behavior on no match, or whether edits are reversible.

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 short sentences, front-loaded with the action and target. The caution sentence earns its place by warning about match verification before a destructive write.

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?

With annotations covering destructive behavior and an output schema present, the description gives enough to understand the insert-before operation and the need to verify the match. It leaves minor gaps around no-match behavior and how create/output interact with insertion, but those are partly covered by the schema.

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 100%, so parameters such as path, search, and create are already documented in the schema. The description reinforces the matching concept with "identified matching paragraph," but adds little syntax or format detail beyond the schema.

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 and resource: insert a new paragraph before an identified matching paragraph in a specified local document. It is clear and distinguishable from the after/append/prepend siblings by the word "before," though it does not explicitly name those alternatives.

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 opening "Use this to insert..." gives implied usage, and "Check the match and the text before writing" adds a caution. It does not say when to prefer this over document_insert_paragraph_after, document_append_paragraph, or document_prepend_paragraph, nor does it state exclusions.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources