run_osascript
Execute AppleScript or JXA scripts on macOS to automate any scriptable app, adjust system settings, and manage files with multiline script support.
Instructions
Execute an AppleScript or JXA (JavaScript for Automation) script on macOS. Automate any scriptable app, control system settings, manage files, and more. Supports multiline scripts. Use language='javascript' for JXA. Timeout: 30s default, max 120s. Max script: 50 KB. Output is truncated at 50000 characters.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| script | Yes | The script source code to execute. | |
| timeout | No | Timeout in seconds (1-120). Default: 30. | |
| language | No | Script language. | applescript |