Skip to main content
Glama
drewster99

xcode-mcp-server (drewster99)

by drewster99

take_window_screenshot

Read-onlyIdempotent

Capture a screenshot of any on-screen window using its window ID or partial title. Supports up to 5 matching windows at once.

Instructions

Take a screenshot of a window by ID or name (case-insensitive substring match). Window IDs can be obtained by calling list_mac_app_windows, or you can simply pass a partial (or complete) window title, like "News" for the News app. If multiple windows match the provided name, screenshots will be taken for up to the first 5 of them.

Note: Only on-screen windows can be found by name.

Args: window_id_or_name: Window ID number or partial window title to match.

Returns: Path(s) to saved screenshot file(s), one per line if multiple matches.

Raises: XCodeMCPError: If no matching windows found or screenshot fails.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
window_id_or_nameYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior5/5

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

Annotations already indicate read-only, non-destructive, idempotent. The description adds important behavior: only on-screen windows by name, up to 5 matches, returns paths to files, raises XCodeMCPError on failure. No contradiction with annotations.

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 well-structured with a clear purpose, note, Args, Returns, and Raises sections. Every sentence adds value, and it is appropriately sized without unnecessary fluff.

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?

Given a single parameter, rich annotations, and an existing output schema (not shown but referenced), the description covers all essential aspects: parameter meaning, return value, error conditions, and a behavioral constraint (on-screen requirement). It is complete for the tool's complexity.

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

Parameters5/5

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

The input schema provides only a type string with no description. The description fully compensates by explaining it accepts a window ID number or partial window title with case-insensitive substring matching, greatly aiding correct invocation.

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 clearly states the tool takes a screenshot of a window by ID or name (case-insensitive substring match). It distinguishes from sibling tools that capture different targets (app, simulator, Xcode) by specifying window-level capture.

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?

Provides guidance on obtaining window IDs via list_mac_app_windows, using partial titles, and notes that only on-screen windows can be found by name. It describes behavior when multiple windows match (up to 5 screenshots) and error cases. However, it does not explicitly state when to prefer this over sibling tools like take_app_screenshot.

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/drewster99/xcode-mcp-server'

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