indesign_uxp_apply_paragraph_style
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
| Name | Required | Description | Default |
|---|---|---|---|
| timeout_ms | No | Optional wait in milliseconds; defaults to 30,000 and is limited to 1,000–120,000 | |
| document_id | Yes | Positive numeric Document.id from the inspection result | |
| text_frame_id | Yes | Positive numeric TextFrame.id from the inspection result | |
| paragraph_index | No | Optional zero-based paragraph index within the frame; omit to apply to every paragraph | |
| paragraph_style_id | Yes | Positive numeric ParagraphStyle.id from indesign_uxp_list_paragraph_styles |