Skip to main content
Glama

script

Execute automation code in AppleScript or JavaScript for Automation against macOS apps with automation dictionaries, returning the result as text.

Instructions

Run AppleScript (default) or JavaScript for Automation. Best for apps with a scripting dictionary. Returns the result as text.

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": {
      "app": "<app>",
      "source": "<source>"
    },
    "name": "script"
  }
}

Input Schema

NameRequiredDescriptionDefault
appYes
sourceYes
languageNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

C2.9/5.0
Behavior2/5

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

No annotations exist, so the description carries the full burden, yet it only says the result returns as text. For a tool that executes arbitrary code in a target app's context, it omits side effects, automation-permission prompts, timeout/error behavior, and that 'source' is unvalidated code — all material to safe invocation.

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?

Three short sentences, front-loaded with the action and each carrying distinct information (purpose, best-fit guidance, return type). No filler, though the extreme brevity leaves no room for the behavioral caveats this tool needs.

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 an unannotated code-execution tool with no output schema and zero parameter documentation, the description is too thin. It should cover execution risk, permissions, and failure modes before an agent can call it confidently.

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 description coverage is 0%, so the description must explain all three parameters. It only clarifies the 'language' default (AppleScript) and loosely implies 'app' is a dictionary-bearing application; 'source' and the expected format of 'app' (name vs. bundle ID) are unexplained.

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?

States a specific verb and resource: 'Run AppleScript (default) or JavaScript for Automation', which tells an agent exactly what the tool executes. It does not differentiate itself from siblings like 'act' or 'observe', but the core purpose is unambiguous.

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?

'Best for apps with a scripting dictionary' gives a positive condition for choosing this tool, which is useful context. It offers no exclusions or named alternatives for apps without scripting dictionaries, so the agent must infer the fallback path.

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

Deploy Server

Other Tools