Skip to main content
Glama

analyze_screenshot

Detect visual anomalies in screenshots by encoding images with a ViT encoder and comparing frames to compute surprise scores, flagging unexpected changes.

Instructions

Encode a screenshot through the ViT encoder and optionally compute a surprise score vs a previous frame. Returns embedding vector, cosine similarity, MSE, and anomaly flag.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sourceYesFile path to an image (png/jpg/webp) OR base64-encoded image data (with or without data URL prefix).
previous_sourceNoOptional: file path or base64 of a previous screenshot to compare against. If omitted, uses the last screenshot passed to this tool.
anomaly_thresholdNoNormalized surprise multiplier above which to flag as anomaly (default 2.0 = 2× baseline).
Behavior2/5

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

No annotations are provided, so the description bears the full burden of disclosing behavioral traits. It states the main operation and outputs but fails to mention the stateful behavior that if previous_source is omitted, the tool uses the last screenshot passed to it. This is a significant gap that could lead to incorrect usage. It also does not disclose any side effects or requirements (e.g., model loaded).

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 a single sentence that is front-loaded with the main action and resource, and it efficiently lists the return values without any filler or unnecessary detail.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The description gives a concise overview of the tool's function and outputs, which is minimally adequate. However, it lacks important context such as the meaning of 'surprise score', output format details (no output schema exists), and the stateful default for previous_source. Given the tool's moderate complexity and absence of annotations, more explanation would be beneficial.

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 all parameters are already documented with useful semantics. The tool description does not add additional parameter-level meaning beyond the schema, but it does mention general outputs that relate to parameters. Baseline 3 is appropriate when the schema handles the heavy lifting.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's function with a specific verb ('Encode'), a resource ('screenshot through the ViT encoder'), and optional behavior ('compute a surprise score'). It also lists the return values. However, it does not differentiate itself from sibling tools like compare_states or run_surprise_detection, which may overlap in functionality.

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

Usage Guidelines3/5

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

The description implies the tool is used for encoding screenshots and optionally comparing them with a previous frame, but it does not provide explicit guidance on when to choose this tool over alternatives like compare_states or run_surprise_detection. No exclusions or prerequisites are mentioned.

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/Gonzih/lewm-mcp'

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