set_page_item_script_label
Assign or clear a script label on selected page items, by current selection, page/item index, or page number and object ID.
Instructions
Overwrite the script label for targeted page items
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": {
"label": "<label>"
},
"name": "set_page_item_script_label"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | No | Selection mode: current selection, page/item indices, or page number plus object id | CURRENT_SELECTION |
| label | Yes | Script label to assign; use empty string to clear | |
| objectId | No | When mode=PAGE_NUMBER_AND_OBJECT_ID, InDesign object id of the page item | |
| itemIndex | No | When mode=PAGE_ITEM, index of the page item (zero-based) | |
| pageIndex | No | When mode=PAGE_ITEM, index of the page containing the item (zero-based) | |
| pageNumber | No | When mode=PAGE_NUMBER_AND_OBJECT_ID, page number using documentOffset+1 |