Skip to main content
Glama
m0rvayne

mcp-osascript

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

TableJSON Schema
NameRequiredDescriptionDefault
scriptYesThe script source code to execute.
timeoutNoTimeout in seconds (1-120). Default: 30.
languageNoScript language.applescript

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.1.3

TDQS

A3.9/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the behavioral disclosure burden. It usefully discloses timeout limits (30s default, max 120s), max script size (50 KB), output truncation (50000 characters), and multiline support. However, it does not mention permission/auth requirements, potential for side effects, or that arbitrary osascript execution may prompt the user or modify system state.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is compact and front-loaded with the core purpose, followed by hard constraints and language guidance. Every sentence contributes new operational information, and there is no repetition of schema fields or filler.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The description covers the main operational constraints and language usage well. However, for an arbitrary code execution tool with no output schema and no annotations, it omits important context: how output and errors are returned, whether execution is synchronous, and what permission/side-effect risks exist. These gaps are meaningful but the description is still substantially complete for basic invocation.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the baseline is 3. The description adds real value by mapping language='javascript' to JXA, stating timeout default and max, and confirming multiline script support. These details go beyond the bare schema descriptions and help the agent choose correct parameter values.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description opens with a specific verb and resource: 'Execute an AppleScript or JXA script on macOS.' It then gives concrete use cases and clearly differentiates from sibling tools like open_app, press_key, or get_clipboard, which are single-purpose actions. The general-purpose scripting scope is unmistakable.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description states broad use cases ('Automate any scriptable app, control system settings, manage files, and more') and explains how to select the JXA option with language='javascript'. However, it does not explicitly name sibling alternatives or state when not to use this tool, leaving routing decisions mostly to inference.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.