osascript
Execute AppleScript or JavaScript for Automation (JXA) on macOS to control applications, automate system events, and run shell commands for workflow automation.
Instructions
Execute AppleScript or JavaScript for Automation (JXA) on macOS. Full access to system automation including shell commands, app control, and System Events. Only file deletion commands are blocked for safety.
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": {
"script": "<script>"
},
"name": "osascript"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| script | Yes | The script to execute | |
| language | No | Script language: AppleScript (default) or JavaScript for Automation (JXA) | AppleScript |