ninja_run_script
Execute a custom script or a built-in action on a specific device, with options to pass parameters and specify credentials.
Instructions
Run a custom script or built-in action on a device. Use ninja_get_device_scripting_options to see what is available.
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": {
"id": "<id>"
},
"name": "ninja_run_script"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | Device ID | |
| type | No | Run a built-in ACTION or a custom SCRIPT | |
| scriptId | No | Script ID (use when type=SCRIPT) | |
| uid | No | Built-in action UID (use when type=ACTION) | |
| parameters | No | Parameters to pass to the script/action | |
| runAs | No | Credential role to run the script as |