Skip to main content
Glama

delete_paragraphs

Delete specific paragraphs from Word documents by 0-based index or range, preserving fields and section breaks, with auto-backup for safe edits.

Instructions

Delete body paragraphs by 0-based inclusive index (start, end; end defaults to start) or by range={start, end} location objects. Refuses ranges cutting a field or a section break; deleting every paragraph leaves one empty one behind. track records tracked deletions. expect_start/expect_end delete nothing unless that index still holds the given text. Auto-backup in file mode (backup=False skips rotation). Open documents edit live (serialized), unsaved until saved. For batches, use apply_edits.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
endNo
liveNoauto
rangeNo
startNo
trackNo
authorNoClaude
backupNo
file_pathYes
expect_endNo
expect_startNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv2.0.1
    • addedInput schema / properties / expect_end
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null
      +}
    • addedInput schema / properties / expect_start
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null
      +}
  2. Changed5 schema fields changedv2.0.0
    • addedInput schema / properties / range
      Added value: +{
      +  "anyOf": [
      +    {
      +      "additionalProperties": true,
      +      "type": "object"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null
      +}
    • addedInput schema / properties / start / anyOf
      Added value: +[
      +  {
      +    "type": "integer"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • addedInput schema / properties / start / default
      Added value: +null
    • removedInput schema / properties / start / type
      Removed value: -"integer"
    • changedInput schema / required
      Previous value: -[
      -  "file_path",
      -  "start"
      -]New value: +[
      +  "file_path"
      +]
  3. Changed1 schema field changedv1.6.1
    • addedInput schema / properties / live
      Added value: +{
      +  "default": "auto",
      +  "type": "string"
      +}
  4. First observedv1.2.1

TDQS

A4.5/5.0
Behavior5/5

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

Annotations only indicate readOnlyHint=false, so the description carries the disclosure burden. It richly reveals mutation-related behaviors: refusal to cut fields/section breaks, empty-paragraph fallback, tracked deletion behavior, expect_start/expect_end no-op safeguards, auto-backup rotation semantics, and live serialized editing. No contradiction with annotations.

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?

Dense but efficient; every sentence adds a distinct behavioral rule or warning. The content is front-loaded with the core operation, and caveats follow logically. A bulleted list could improve scannability, but for the volume of caveats the length is justified.

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 10-parameter destructive operation with no destructiveHint annotation, this description covers the critical edge cases: guarded ranges, empty result handling, backup behavior, live-editing semantics, and safe-deletion expectations. The existence of an output schema covers return values. Minor omissions (author semantics, live value options) keep it from a 5.

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 0%, so the description must compensate. It clarifies start/end inclusive semantics, range objects, track, expect_start/expect_end conditions, backup behavior, and live editing. It does not explain the author parameter or enumerate live value options, but the essential parameters are well interpreted.

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?

Description opens with a specific verb and resource: 'Delete body paragraphs' and specifies the exact addressing scheme (0-based inclusive index/range). This clearly distinguishes it from sibling tools like delete_table, delete_element, and apply_edits, and mentions apply_edits specifically for batch operations.

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?

Explicitly redirects batch work to apply_edits ('For batches, use apply_edits') and describes when live editing applies. It does not enumerate conditions for choosing this over delete_element or delete_table, but the domain-specific semantics ('body paragraphs', refusal of field/section break cuts) give strong contextual signals.

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