Skip to main content
Glama

compare_frames

Compare screenshots at two frames to detect pixel differences for visual regression testing. Reports changed pixel count, percentage, and altered screen regions.

Instructions

Compare screenshots at two frames and report pixel differences.

Captures the screen as color grids at two frames and computes a diff. Returns changed pixel count, percentage, and which screen regions changed. Use this for visual regression testing.

Args: script_path: Absolute path to the .py script to run. frame_a: First frame number (default: 1). frame_b: Second frame number (default: 30). timeout: Maximum seconds to wait for the script (default: 15).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
script_pathYes
frame_aNo
frame_bNo
timeoutNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior3/5

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

With no annotations provided, the description carries the full burden. It discloses behavioral traits such as capturing screens, computing diffs, and returning metrics (changed pixel count, percentage, regions). However, it lacks details on permissions, rate limits, error handling, or what happens if the script fails, which are important for a tool that runs external scripts with a timeout.

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 appropriately sized and front-loaded, starting with the core purpose, followed by a brief explanation of the process, usage context, and parameter details. Each sentence adds value without redundancy, making it efficient and well-structured.

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?

Given the tool's complexity (running scripts, comparing frames) and no annotations, the description does a good job covering purpose, usage, and parameters. Since an output schema exists, it need not explain return values, but it still mentions what is returned. It could be more complete by addressing potential failures or dependencies, but it's largely adequate.

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 description coverage is 0%, so the description must compensate. It adds meaning by explaining each parameter's role: 'script_path' as an absolute path to a .py script, 'frame_a' and 'frame_b' as frame numbers with defaults, and 'timeout' as maximum wait seconds. This clarifies semantics beyond the schema's basic titles, though it could provide more context on valid ranges or formats.

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's purpose with specific verbs ('compare screenshots', 'captures the screen', 'computes a diff') and resources ('screenshots at two frames', 'color grids'). It distinguishes from siblings by focusing on visual comparison rather than inspection or capture operations, making its function unambiguous.

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?

The description provides clear context for usage ('Use this for visual regression testing'), which implicitly suggests when to use it. However, it does not explicitly state when not to use it or name alternatives among siblings like 'capture_frames' or 'inspect_screen', leaving some guidance gaps.

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/kitao/pyxel-mcp'

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