Skip to main content
Glama
ssh071102-code

claude-screen-mcp

Wait For Screen Change

wait_for_change

Polls the screen and returns as soon as a change is detected or timeout elapses, so clients can wait for a process to finish without constant checks.

Instructions

Long-poll the screen and return as soon as the perceptual-hash distance from the start frame ≥ threshold, or when the timeout elapses. Useful for 'ping me when X finishes' workflows — the server does the polling so the client only spends a turn when something actually changed. Returns an image on change, or a no-image diagnostics text on timeout. Polling is CPU-light (dHash on a 9x8 downscale). Hard timeout cap is 5 minutes.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
formatNoOutput format. Default jpeg.
pollMsNoPolling interval in ms. Default 500, min 200. Lower = more CPU + more responsive. Higher = cheaper + slower reaction.
maxEdgeNoResize so longest edge ≤ N px when image is returned. Default 1600.
qualityNoQuality (1-100) for jpeg/webp.
cacheKeyNoCache key (shared with screenshot_if_changed / get_screen_diff). If a baseline exists for this key, change is measured against it; otherwise the first capture becomes the reference.
displayIdNoDisplay id from `list_displays`. Omit for primary.
thresholdNoHamming distance threshold (1-64). Returns image as soon as distance from start frame ≥ threshold. Default 8.
timeoutMsNoMax time to wait for a change before returning a no-change result. Default 30s, hard cap 300s. Long-blocks the MCP transport — keep ≤ 5 min so the client doesn't time out.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.4.0

TDQS

A4.2/5.0
Behavior4/5

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

No annotations are provided, so the description carries full behavioral burden. It discloses the blocking behavior ('long-blocks the MCP transport — keep ≤ 5 min'), the 5-minute hard timeout cap, the CPU cost profile, and — critically — the two distinct return shapes (image on change, no-image diagnostics on timeout). It doesn't mention permission or error mode requirements, but the operational semantics are unusually well surfaced.

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?

Five sentences, each earning its place: behavior, use-case motivation, return shapes, cost profile, and hard cap. Front-loaded with the core action. No filler or repetition.

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 an 8-param long-polling tool with no output schema and no annotations, the description covers the essential behavioral envelope (blocking, timeout cap, return shapes, cost). It would be stronger still with a note on permission/auth needs or error behavior, but the operationally risky aspects are covered.

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

Parameters3/5

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

Schema description coverage is 100%, and the schema already documents caching, threshold semantics, polling, and default values in detail. The description largely restates what the schema covers (perceptual-hash distance, dHash downscale, timeout cap). Baseline 3 applies since the schema does the heavy lifting for parameter 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?

States a specific verb and resource ('Long-poll the screen and return as soon as the perceptual-hash distance from the start frame ≥ threshold') with clear semantics. The 'ping me when X finishes' framing and the contrast with screenshot_if_changed/get_screen_diff make it distinguishable from siblings. No ambiguity about what the tool does.

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?

Explains the intended scenario ('ping me when X finishes' workflows) and states that the server does the polling so the client only spends a turn on change. However, it does not explicitly name sibling tools like screenshot_if_changed or get_screen_diff as alternatives or draw when-not-to-use boundaries, leaving sibling routing to inference.

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