Skip to main content
Glama

mac_key

Presses a key or modifier chord on macOS and can refuse input unless a specified app is frontmost, preventing shortcuts from hitting the wrong window.

Instructions

Press a key or modifier chord, e.g. 'return', 'esc', 'cmd-c', 'cmd-shift-v', 'arrow-up'. Pass app to refuse input unless that app is frontmost (focus guard).

Input Schema

NameRequiredDescriptionDefault
appNo
keyNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.2

TDQS

A3.7/5.0
Behavior3/5

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

With no annotations, the description carries the full burden, and it does disclose one genuine behavioral trait: the frontmost-app guard that causes the press to be refused. It says nothing about what a refusal looks like (error vs. silent no-op), whether keys auto-repeat, what focus state is needed when `app` is omitted, or what the tool returns.

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?

Two sentences, zero filler, and the core action with format examples is front-loaded ahead of the conditional focus-guard clause. Nothing needs trimming or reordering.

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

Completeness4/5

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

For a two-parameter tool with no output schema and no annotations, the description covers both parameters plus a failure-mode guard, which is close to sufficient. It falls short only on outcome reporting — an agent still cannot predict whether a refused press raises an error or returns a status.

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 0%, so the description must compensate and does: `key` is explained by example for both plain keys and modifier chords, and `app` gets a precise meaning (frontmost focus guard). What is still missing is whether `key` values are case-sensitive or platform-specific beyond the 'cmd'/'arrow-up' examples.

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?

Specific verb ("Press") plus resource (a key or modifier chord) with concrete examples ('return', 'cmd-shift-v', 'arrow-up') that make the accepted key syntax immediately legible. It does not name the siblings it differs from (mac_type, mac_paste, browser_press_key), so an agent must infer that this is the single-keystroke/shortcut tool rather than text entry.

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 a real usage condition for `app`: input is refused unless that app is frontmost, framing it as a focus guard. But it gives no guidance on when to choose this over mac_type or mac_paste, nor when the focus guard should be used versus omitted — that choice is left implicit.

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