run_script_on_device
Execute a saved script on a specific NinjaOne device using its device ID and script ID, with optional run-as context and parameters.
Instructions
Execute a saved script on a specific device. The script must already exist in NinjaOne's script library.
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": {
"device_id": "<device_id>",
"script_id": "<script_id>"
},
"name": "run_script_on_device"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| device_id | Yes | NinjaOne device ID to run the script on | |
| script_id | Yes | ID of the saved script to execute | |
| run_as | No | Security context to run the script under | SYSTEM |
| parameters | No | Optional parameters to pass to the script |