run_script
Runs HWP script macros directly on an open document. Provide doc_id and script source to automate editing, formatting, or conversion tasks.
Instructions
Execute a HWP script macro directly.
Args: doc_id: Document ID from open_document script: Script source code to execute
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": {
"doc_id": "<doc_id>",
"script": "<script>"
},
"name": "run_script"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| doc_id | Yes | ||
| script | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||