Skip to main content
Glama

set_paragraph_format

Set paragraph formatting (alignment, spacing, indents, outline level) for a batch of paragraphs selected by indices or a start/end range in Word documents, with auto backup and atomic 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
startNo
backupNo
indicesNo
file_pathYes
formattingNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. 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"
      +]
  2. Changed1 schema field changedv1.6.1
    • addedInput schema / properties / live
      Added value: +{
      +  "default": "auto",
      +  "type": "string"
      +}
  3. First observedv1.2.1

TDQS

A4/5.0
Behavior5/5

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

The description goes well beyond the minimal readOnlyHint=false annotation by disclosing auto-backup, atomic validated saves, serialized live editing, refusal of shading/borders/tab_stops on live documents, and the non-visual nature of outline_level. These are important behavioral traits that cannot be inferred from the schema or annotations alone.

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 dense and front-loaded with the core action and selection contract, followed by formatting keys and behavioral caveats. Each clause adds useful information, though the final apply_edits sentence is slightly confusing and could be reworded for clarity.

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 description covers selection semantics, formatting keys, live-editing constraints, backup behavior, and an alternative tool, which is sufficient for a safe first call. The presence of an output schema reduces the need to describe return values, but the live/backup parameter choices and the exact relationship to apply_edits remain somewhat underspecified.

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?

With 0% schema description coverage, the description compensates well by defining the two exclusive selection forms, listing all formatting keys, and specifying outline_level's 0-8 range and null-removes behavior. It does not fully explain the live and backup parameter options, but the core invocation semantics are clearly established.

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?

The description clearly identifies the action—setting paragraph formatting—and the target selection mechanism (indices or start/end range), and enumerates the supported formatting keys. However, the closing instruction 'For batches, use apply_edits' introduces ambiguity about whether this tool or its sibling is the correct choice 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 Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description offers some routing guidance by naming apply_edits as a batch-oriented alternative and by describing live-editing restrictions. It does not explain when to prefer this tool over format_text or apply_style, and the word 'batch' is used inconsistently—first as this tool's scope, then as a reason to use apply_edits.

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