set_style
Create or update paragraph and character styles with any InDesign properties, then apply them consistently instead of formatting text by hand.
Instructions
Create or update a paragraph or character style with ANY InDesign properties. This is how book typography should be defined — then apply it with apply_style instead of formatting text by hand. properties examples: {font:"EB Garamond", fontStyle:"Medium", pointSize:13, leading:15, justification:"LEFT_JUSTIFIED", firstLineIndent:"0.125in", spaceAfter:"0.125in", hyphenation:false, fillColor:"Black", tracking:40, capitalization:"ALL_CAPS", startParagraph:"NEXT_ODD_PAGE", keepWithNext:2, dropCapLines:3, dropCapCharacters:1}. Sizes/leading are points; indents and spacing accept unit strings ("0.125in", "9pt", "3mm"). ALL_CAPS strings become InDesign enum values. A character style only changes the properties you give it (e.g. {fontStyle:"Italic"}).
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": {
"type": "<type>",
"name": "<name>"
},
"name": "set_style"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Style name | |
| type | Yes | Style type | |
| group | No | Optional style group path, e.g. "Body" or "Front Matter/Titles" | |
| basedOn | No | Parent style name (changes to it flow down) | |
| nextStyle | No | Paragraph only: style used for the next paragraph when typing | |
| properties | No | InDesign properties to set (see description) |