Skip to main content
Glama

run_applescript

Destructive

Run AppleScript as the logged-in macOS user. Accessibility permission may be required for UI control.

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": "run_applescript"
  }
}

Input Schema

NameRequiredDescriptionDefault
scriptYes
deviceIdNoComputer name or id
workSessionIdNoFrom create_work_session

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • changedInput schema / properties / deviceId / description
      Previous value: -"Computer name or id; optional with one computer or a default"New value: +"Computer name or id"
    • removedInput schema / properties / script / minLength
      Removed value: -1
  2. Changed2 schema fields changed
    • changedInput schema / properties / deviceId / description
      Previous value: -"Computer name or id from list_devices. Optional with one computer online or a default set."New value: +"Computer name or id; optional with one computer or a default"
    • changedInput schema / properties / workSessionId / description
      Previous value: -"Work session from create_work_session. Pass the same ID on every call in this conversation; omit for legacy unscoped work."New value: +"From create_work_session"
  3. Changed1 schema field changed
    • addedInput schema / properties / workSessionId
      Added value: +{
      +  "description": "Work session from create_work_session. Pass the same ID on every call in this conversation; omit for legacy unscoped work.",
      +  "format": "uuid",
      +  "type": "string"
      +}
  4. First observed

TDQS

C2.9/5.0
Behavior3/5

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

Annotations already declare destructiveHint=true and openWorldHint=true, so the safety bar is lower. The description adds genuinely useful context beyond them: arbitrary script executes under the logged-in user's identity and may require Accessibility permissions for UI control. It still does not state that arbitrary code executes with the user's full privileges, nor what kinds of state can be destroyed, nor timeout/failure behavior.

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

Conciseness4/5

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

Two short sentences, no filler, and the execution context is front-loaded before the permission caveat. Nothing is wasted, but brevity here sits close to under-specification rather than tight editing.

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

Completeness2/5

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

For a destructive, open-world tool that executes arbitrary code with no output schema and only partial parameter documentation, the description is too thin. It says nothing about return values, error/timeout semantics, or what happens when Accessibility permission is missing, all of which an agent needs before invoking it.

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

Parameters2/5

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

Schema coverage is 67%, and the description says nothing about any parameter. Crucially, the required 'script' parameter is undocumented in both places, leaving its format ambiguous (inline AppleScript source vs. a file path). 'As the logged-in macOS user' only loosely implies the deviceId scoping that the schema already covers.

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

Purpose4/5

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

The description gives a specific verb and resource ('Run AppleScript') plus the execution identity ('as the logged-in macOS user'). It does not distinguish itself from siblings like run_command, run_script, or run_workflow, so an agent cannot tell from this text alone which executor to pick.

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

Usage Guidelines2/5

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

There is no when-to-use or when-not-to-use guidance and no routing to alternatives such as run_command for shell or run_workflow for larger automation. The only contextual hint is that accessibility permission may be needed for UI control, which is a prerequisite, not selection guidance.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources