Skip to main content
Glama
ssh071102-code

claude-screen-mcp

Get Screen Diff

get_screen_diff

Measure the perceptual-hash distance between the current screen and a cached baseline to detect screen changes before spending vision tokens. Returns diagnostics only.

Instructions

Compute the perceptual-hash distance between the current screen and the cached baseline (set by previous calls of get_screen_diff or screenshot_if_changed). Returns only diagnostics — no image. Useful for polling whether a screen has changed before spending vision tokens. Default updateBaseline=false (read-only check).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
cacheKeyNoOverride cache key. Default = displayId. Cache is shared with `screenshot_if_changed` — use the same cacheKey to make distance numbers comparable across the two tools.
displayIdNoDisplay id from `list_displays`. Omit for primary.
updateBaselineNoIf true, advance the cached baseline to the current value (subsequent calls measure distance from this call). Default false to keep the reference point stable for repeated polling. Regardless of this flag, the first observation for a cacheKey always establishes the baseline.

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?

With no annotations, the description carries the full burden and does so well: it discloses the return shape (diagnostics, no image), the baseline caching side effect, the read-only default (updateBaseline=false), and the first-observation baseline rule. It lacks detail on the distance scale/threshold semantics an agent would need to act on the number.

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?

Three tight sentences, front-loaded with the core action and immediately followed by the output nature, usage rationale, and default. No wasted words.

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 3-param, read-only compute tool with no output schema, the description explains the return nature and baseline behavior adequately. It stops just short of interpreting what the returned distance value means for decision-making.

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%, so cacheKey, displayId, and updateBaseline are already well documented in the schema (including the default-false meaning). The description only restates the default value, adding little beyond the schema.

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 (compute the perceptual-hash distance) and resource (current screen vs cached baseline), and distinguishes itself from siblings by noting it 'Returns only diagnostics — no image' and shares state with screenshot_if_changed. An agent can tell it apart from screenshot/wait_for_change without opening schemas.

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 a clear context — 'Useful for polling whether a screen has changed before spending vision tokens' — and notes the read-only default. It does not explicitly exclude or route to alternatives like wait_for_change, so it stops short of full when/when-not guidance.

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