Skip to main content
Glama

Run a command on a Mac

exec_mac
Destructive

Run arbitrary argv in your Mac workspace. Returns a durable job ID; poll get_mac_job and read_mac_output. Preserve request_key and exact arguments after lost responses. Use bash -lc explicitly for shell syntax. timeout_seconds defaults to 300 and caps at 600; raise it for slow work such as a first simulator boot, which needs about 90 seconds.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
argvYesCommand and arguments as an array, for example ["bash", "-lc", "xcodebuild -list"]. Runs as the agent user in the workspace directory.
session_idYesMac session ID (ses_…) returned by start_mac or list_mac_sessions.
request_keyYesIdempotency key you choose (letters, digits, dash, underscore). Retry a lost response with the same key and identical arguments; use a new key for new work.
timeout_secondsNoStop the command after this many seconds (1-600, default 300).

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
errorNoPresent only when the call failed

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.7/5.0
Behavior5/5

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

Annotations already cover destructive/openWorld, and the description adds the facts an agent actually needs: the call is asynchronous and returns a durable job ID rather than output, timeout defaults to 300 and caps at 600, ~90s is expected for a first simulator boot, and request_key + identical args is the recovery path after a lost response. This is genuinely additive behavioral context, not restatement.

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?

Four tightly packed sentences with the core action front-loaded, followed by the follow-up tools, correctness rule, and timeout behavior in priority order. No filler or repetition of the title.

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

Completeness5/5

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

The async job model, the full retrieval path (get_mac_job/read_mac_output), timeout bounds, retry semantics, and shell invocation guidance are all present, and an output schema exists so return-value detail is not needed here. Nothing required to call this tool correctly is missing.

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 description coverage is 100%, so the baseline is 3, but the description adds real meaning beyond it: the bash -lc guidance for shell syntax and the simulator-boot rationale for raising timeout_seconds go past what the schema fields say. The idempotency explanation for request_key largely duplicates the schema text, which keeps this from a 5.

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?

States a concrete verb+resource ("Run arbitrary argv in your Mac workspace") and immediately distinguishes itself from siblings by naming get_mac_job and read_mac_output as the polling/read path. An agent can tell this is the execution entry point in the Mac session family without opening the schema.

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

Usage Guidelines4/5

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

Gives clear operational routing (poll get_mac_job, read_mac_output) and a specific usage rule (use bash -lc explicitly for shell syntax) plus a sizing heuristic for timeout_seconds on slow work like a simulator boot. It does not state when NOT to use the tool or what alternative exists for non-argv operations, so it falls short of a full 5.

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