Skip to main content
Glama

Set Paragraph Format

set_paragraph_format
DestructiveIdempotent

Apply paragraph formatting to one or multiple paragraphs in Word documents using indices or a range. Set alignment, spacing, indents, keep-with-next, and outline level with automatic backup and validated save.

Instructions

Set paragraph formatting on a batch: indices (0-based list) OR start/end (inclusive range), exactly one form. Keys: alignment, space_before_pt, space_after_pt, line_spacing, indent_left_pt, indent_right_pt, first_line_indent_pt, keep_with_next, outline_level. outline_level (0-8; null removes) never changes the look; it is off by one from heading_level 1-9. Auto-backup; atomic validated save. Open documents edited live (serialized; shading/borders/tab_stops refused live). For batches, use apply_edits.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
endNo
liveNoauto: file or live; force: live; off: refuseauto
startNo
backupNo
indicesNo
file_pathYes
formattingNo

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. Changed11 schema fields changedv2.0.0
    • addedInput schema / properties / end
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "integer"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null
      +}
    • removedInput schema / properties / formatting / additionalProperties
      Removed value: -true
    • addedInput schema / properties / formatting / anyOf
      Added value: +[
      +  {
      +    "additionalProperties": true,
      +    "type": "object"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • addedInput schema / properties / formatting / default
      Added value: +null
    • removedInput schema / properties / formatting / type
      Removed value: -"object"
    • addedInput schema / properties / indices / anyOf
      Added value: +[
      +  {
      +    "items": {
      +      "type": "integer"
      +    },
      +    "type": "array"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • addedInput schema / properties / indices / default
      Added value: +null
    • removedInput schema / properties / indices / items
      Removed value: -{
      -  "type": "integer"
      -}
    • removedInput schema / properties / indices / type
      Removed value: -"array"
    • addedInput schema / properties / start
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "integer"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null
      +}
    • changedInput schema / required
      Previous value: -[
      -  "file_path",
      -  "indices",
      -  "formatting"
      -]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 already carry idempotentHint and destructiveHint, so the description earns credit for adding context: auto-backup, atomic validated save, serialized live editing, and refused features in live mode. The outline_level 'never changes the look' note is a non-obvious behavioral disclosure that materially prevents mis-calls.

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?

Front-loaded with purpose and selection forms, then keys, then caveats, then routing. The keys list is long but necessary because the formatting schema is an open additionalProperties object. The live-mode sentence is slightly jumbled with parentheticals, but every sentence earns its place.

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?

Covers the main gotchas for a destructive mutation tool: backup, atomicity, live-mode restrictions, and the outline_level trap. Output schema exists, so return-value details need not be described. Minor gap: error/failure behavior beyond 'validated save' is not discussed, but the description is strong overall for a 7-parameter tool with minimal schema coverage.

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 coverage is only 14% (only 'live' is described), so the description must compensate. It adds the mutually-exclusive indices/start-end selection semantics, the formatting object's key list, and critical value semantics for outline_level (0-8, null removes, off-by-one from heading_level). It does not detail value types for each key, but the key list plus the open formatting schema makes this solid.

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?

States a specific verb and resource ('Set paragraph formatting on a batch') and scopes the operation precisely with the selection forms (indices vs start/end) and the formatting keys. It also names apply_edits as the sibling it is not, making the differentiation explicit.

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?

Gives explicit routing guidance ('For batches, use apply_edits'), the 'exactly one form' constraint, and the live-mode conditions with what is refused ('shading/borders/tab_stops refused live'). It does not contrast with format_text or apply_style, but the core when/when-not guidance is present.

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