Skip to main content
Glama

mac_state

Retrieve a real-time snapshot of macOS: active app, open windows, selected files, and running processes, so your automation knows exactly what's on screen.

Instructions

Read current macOS state: frontmost app, windows, Finder selection, running apps.

Examples:

  • All state: {} (returns everything)

  • Window list only: { include: ["windows"] }

  • Frontmost app: { include: ["frontmost_app"] }

Limitations:

  • Window list requires Accessibility for the apps you want to see.

  • "clipboard" still works but mac_clipboard is preferred (lighter + write support).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
includeNoWhat state to query (default: all)
Behavior4/5

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

With no annotations, the description responsibly discloses key behaviors: empty input returns all state, window listing depends on Accessibility, and clipboard functionality is supported but deprecated in favor of a sibling tool. It does not describe the output format or potential side effects, but for a read-only state tool that is acceptable.

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, well-organized into overview, examples, and limitations. Each sentence serves a distinct purpose: defining scope, demonstrating usage, and flagging caveats. There is no fluff or redundancy.

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?

The tool is simple (one optional parameter) and the description covers all enum values, usage, and limitations. However, with no output schema, it would be stronger to hint at the structure of the returned state. Still, for its complexity, it is sufficiently complete.

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?

The schema already documents the 'include' parameter with enum values and a default, giving baseline coverage. The description adds value by showing exactly how to pass values in examples and clarifying that omitting include returns everything, which enriches the schema's meaning.

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: 'Read current macOS state,' and enumerates the exact aspects (frontmost app, windows, Finder selection, running apps). It distinguishes itself from siblings by explicitly noting that the clipboard is better served by mac_clipboard, making the tool's scope clear.

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

Usage Guidelines5/5

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

The description provides concrete usage examples for all state, window-only, and frontmost-app queries. It also gives clear exclusions: the clipboard works but mac_clipboard is preferred, and window listing requires Accessibility permissions. This gives an agent explicit guidance on when and how to invoke the tool.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/leesgit/mac-pilot-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server