Skip to main content
Glama
InDesign MCP

InDesign MCP

indesign_uxp_apply_paragraph_style

DestructiveIdempotent

Apply a paragraph style to every paragraph in a text frame or one zero-based paragraph while preserving formatting overrides. Identify document, frame, and style by ID.

Instructions

Applies one paragraph style from the explicitly identified document to all paragraphs in an explicitly identified text frame, or to one zero-based paragraph when paragraph_index is supplied. Formatting overrides are preserved. This changes the document. After a timeout, the style may still have been applied; inspect before retrying and do not retry blindly.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "document_id": "<document_id>",
      "text_frame_id": "<text_frame_id>",
      "paragraph_style_id": "<paragraph_style_id>"
    },
    "name": "indesign_uxp_apply_paragraph_style"
  }
}

Input Schema

NameRequiredDescriptionDefault
timeout_msNoOptional wait in milliseconds; defaults to 30,000 and is limited to 1,000–120,000
document_idYesPositive numeric Document.id from the inspection result
text_frame_idYesPositive numeric TextFrame.id from the inspection result
paragraph_indexNoOptional zero-based paragraph index within the frame; omit to apply to every paragraph
paragraph_style_idYesPositive numeric ParagraphStyle.id from indesign_uxp_list_paragraph_styles

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.3.0

TDQS

A3.8/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=false, destructiveHint=true and idempotentHint=true, so the mutation profile is known. The description adds real value beyond that: it states formatting overrides are preserved and warns that a timeout may still have applied the style, so blind retries are unsafe. However, it does not say what happens on an invalid style id or partial failures, and the idempotency claim stays implicit rather than restating that re-applying is safe.

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?

Three short sentences, each earning its place: capability and scope first, then the side effect and override preservation, then the retry hazard. Mutation warning is front-loaded rather than buried.

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 5-parameter mutating tool with no output schema, the description covers scope, side effects, and the timeout/retry failure mode that an agent most needs. It omits error conditions (nonexistent style or frame) and whether the response confirms how many paragraphs were affected.

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 description coverage is 100%, so every parameter including timeout_ms ranges and paragraph_index semantics is already documented in the schema. The description restates paragraph_index behavior and emphasizes 'explicitly identified' ids but adds no new meaning such as ordering, index bounds beyond the frame, or timeout interaction. Baseline 3 applies when the schema carries the burden.

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 precise verb and resource ('Applies one paragraph style') plus the exact target scope (all paragraphs in a named text frame, or a single paragraph when paragraph_index is supplied). An agent can distinguish the two operating modes immediately. It stops short of naming sibling tools such as indesign_uxp_list_paragraph_styles as the source of the style id, so it doesn't fully differentiate from the catalog.

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?

Clear contextual guidance for the two modes: omit paragraph_index to hit every paragraph, supply it for a single zero-based paragraph. It also gives a concrete recovery instruction after a timeout. It does not state when to prefer this tool over indesign_uxp_set_text_frame or similar siblings, nor any prerequisites such as the frame already existing.

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