Skip to main content
Glama

Delete Paragraphs

delete_paragraphs
Destructive

Delete body paragraphs from Word .docx files by index or range. Safeguards prevent cutting fields or section breaks, with tracked deletions and backups supported.

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: file or live; force: live; off: refuseauto
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.2.1
    • addedInput schema / properties / live / description
      Added value: +"auto: file or live; force: live; off: refuse"
    • addedInput schema / properties / live / enum
      Added value: +[
      +  "auto",
      +  "force",
      +  "off"
      +]
  2. 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
      +}
  3. 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"
      +]
  4. Changed1 schema field changedv1.6.1
    • addedInput schema / properties / live
      Added value: +{
      +  "default": "auto",
      +  "type": "string"
      +}
  5. 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 already mark this as destructive (destructiveHint=true) and not read-only (readOnlyHint=false). The description adds substantial behavioral detail: '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,' and 'Auto-backup in file mode.' These go well beyond the annotations and describe edge cases and side effects, making behavior predictable.

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?

The description is a single dense paragraph but each sentence contributes information. It front-loads the primary usage (start/end/range), then constraints, then special parameters, then live behavior, and finally the batch alternative. It's not overly verbose, though it could be organized with bullet points for clarity. Still, it's efficient and well-structured.

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?

The tool has an output schema, so return values are documented there. Annotations cover the destructive nature. The description covers many behaviors: deletion modes, constraints, tracking, expected text checks, backup, and live editing. It doesn't explicitly state what happens on success or error, but given the output schema and the density of details, it is fairly complete for an agent to use correctly. Some edge cases like 'deleting every paragraph leaves one empty one behind' are noted, which is helpful.

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 only 10%, so the description must compensate. It does explain key parameters: start/end/range for the deletion range, track for tracking deletions, expect_start/expect_end for conditional deletion, and backup for auto-backup behavior. However, it doesn't describe 'author,' 'live,' or 'file_path' explicitly, though some are implied (e.g., 'Open documents edit live' implies the live parameter). Given the low schema coverage, it adds meaningful semantics for most parameters but leaves a few self-explanatory ones unaddressed.

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's function: 'Delete body paragraphs by 0-based inclusive index (start, end; end defaults to start) or by range={start, end} location objects.' It also differentiates from siblings by noting 'For batches, use apply_edits,' which explicitly names an alternative. The verb 'delete' and resource 'paragraphs' are specific and unambiguous.

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?

It provides clear usage context: 'Open documents edit live (serialized), unsaved until saved' and 'Auto-backup in file mode (backup=False skips rotation).' It also gives an explicit exclusion: 'For batches, use apply_edits.' However, it doesn't elaborate on when to use delete_element or other deletion tools, so it's not fully comprehensive but adequate.

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