Create, replace or delete provision script
manage_provisionCreate, replace, or delete GenieACS provision scripts to control how devices are configured during inform sessions; remove scripts that are no longer needed.
Instructions
Create, replace or delete a GenieACS provision script. A provision is JavaScript that GenieACS runs during the inform session of every device a preset applies it to, so replacing one changes how those devices are configured. Scripts use the GenieACS sandbox API (declare, commit, clear, ext, log); ext() calls extension scripts that run on the ACS host with full privileges, so treat a provision as code running on your ACS. action="put" uploads or overwrites the script (raw JavaScript, not JSON; GenieACS answers 400 on a syntax error); action="delete" removes it. Presets reference provisions by name. Read genieacs://provisions/list first. Example script: log("Device " + DeviceID.ID + " informed");
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": {
"action": "<action>",
"name": "<name>"
},
"name": "manage_provision"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | The provision name, its id on GenieACS. | |
| action | Yes | "put" creates or replaces the script, "delete" removes it. | |
| script | No | For action="put": the JavaScript source. Ignored for "delete". |