MCP Server to execute AppleScript and JXA on macOS.
This server has two tools with strong naming and reasonable descriptions, but exhibits critical gaps in parameter documentation and output schema clarity. The execute_script tool has an exceptionally detailed description (>1000 chars) that risks token waste, while parameter descriptions are present but inconsistent in depth. The get_scripting_tips tool has adequate naming but sparse parameter documentation. Neither tool's output schema is formally documented in the source code. Error handling is mentioned in the description but not formalized in schema. The server demonstrates good intent but falls short of production-grade definition quality due to underdocumented outputs and missing output schema declarations.
Automate macOS tasks using AppleScript or JXA (JavaScript for Automation) to control applications like Terminal, Chrome, Safari, Finder, etc. **1. Script Source (Choose one):** * `kb_script_id` (string): **Preferred.** Executes a pre-defined script from the knowledge base by its ID. Use `get_scripting_tips` to find IDs and inputs. Supports placeholder substitution via `input_data` or `arguments`. Ex: `kb_script_id: "safari_get_front_tab_url"`. * `script_content` (string): Executes raw AppleScript/JXA code. Good for simple or dynamic scripts. Ex: `script_content: "tell application \"Finder\" to empty trash"`. * `script_path` (string): Executes a script from an absolute POSIX path on the server. Ex: `/Users/user/myscripts/myscript.applescript`. **2. Script Inputs (Optional):** * `input_data` (JSON object): For `kb_script_id`, provides named inputs (e.g., `--MCP_INPUT:keyName`). Values (string, number, boolean, simple array/object) are auto-converted. Ex: `input_data: { "folder_name": "New Docs" }`. * `arguments` (array of strings): For `script_path` (passes to `on run argv` / `run(argv)`). For `kb_script_id`, used for positional args (e.g., `--MCP_ARG_1`). **3. Execution Options (Optional):** * `language` ('applescript' | 'javascript'): Specify for `script_content`/`script_path` (default: 'applescript'). Inferred for `kb_script_id`. * `timeout_seconds` (integer, optional, default: 60): Sets the maximum time (in seconds) the script is allowed to run. Increase for potentially long-running operations. * `output_format_mode` (enum, optional, default: 'auto'): Controls `osascript` output formatting. * `'auto'`: Smart default - resolves to `'human_readable'` for AppleScript and `'direct'` for JXA. * `'human_readable'`: For AppleScript, uses `-s h` flag. * `'structured_error'`: For AppleScript, uses `-s s` flag (structured errors). * `'structured_output_and_error'`: For AppleScript, uses `-s ss` flag (structured output & errors). * `'direct'`: No special output flags (recommended for JXA). * `include_executed_script_in_output` (boolean, optional, default: false): If `true`, the final script content (after any placeholder substitutions) or script path that was executed will be included in the response. This is useful for debugging and understanding exactly what was run. Defaults to false. * `include_substitution_logs` (boolean, default: false): For `kb_script_id`, includes detailed placeholder substitution logs. * `report_execution_time` (boolean, optional, default: false): If `true`, an additional message with the formatted script execution time will be included in the response. Defaults to false.
Output schemas are not formally documented. Neither execute_script nor get_scripting_tips declare their return types in the source code. LLMs cannot plan downstream operations without knowing what fields to expect.
execute_script description is excessively long (~1200 chars). Rubric baseline is 194 chars average; this wastes tokens on verbose explanation of placeholder substitution and execution options that could be conveyed in parameter descriptions instead.
Parameter descriptions lack actionable constraints. For example, 'timeout_seconds' lacks a stated range (e.g., 1-3600); 'limit' in get_scripting_tips lacks guidance on what happens if exceeded. Rubric requires: 'Specify minimum and maximum for numeric parameters.'
Inferred effective spec: <=2025-11-25.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-22 | D | 54 | <=2025-11-25 | v2 |
| 2026-03-09 | D | 52 | - | v1 |
Browse and search the knowledge base of AppleScript and JXA tips and code snippets. Find pre-made automation scripts with detailed documentation, usage examples, and placeholders for customization.
Mutually exclusive parameters not documented. execute_script accepts script_content, script_path, and kb_script_id but the description does not state clearly that exactly one must be provided. LLMs will pass multiple values unless explicitly told not to.
Error handling is mentioned in the description (e.g., 'execution error', 'timeout') but not formalized as a recovery guide in the tool definition. Rubric requires: 'Error responses must tell the LLM what to do next.' No guidance on retryability, user-fixable vs. fatal, or next steps.
get_scripting_tips parameter 'refresh_database' lacks explanation of cost/side effects. Does it block? Is it slow? When should an LLM call it? Without guidance, LLMs may invoke it unnecessarily, wasting latency.