Skip to main content
Glama

glass_screenshot

Capture a native app window or a window-relative region as a lossless WebP screenshot. Handles off-screen clipping by returning the actual captured size.

Instructions

Capture the app window (or an optional window-relative region) as a screenshot (lossless WebP image). A capture reaching off the display edge is clipped to the on-screen portion — the returned width/height are the actual captured size, so a frame smaller than the window/region means it was clipped; only a fully off-screen surface errors.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
regionNoOptional window-relative sub-rectangle to capture; omit for the whole window.
window_idNoCapture/observe this window (id from `glass_list_windows`) instead of the active one, without changing which window subsequent ops target. Omit for the active window.
Behavior5/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It thoroughly explains clipping behavior, the meaning of returned width/height relative to the requested frame, and the error condition for fully off-screen surfaces. This goes well beyond a simple 'captures a screenshot' statement.

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 two sentences, front-loaded with the primary action, and each subsequent clause adds meaningful detail about clipping and error handling. There is no filler or redundant repetition of schema information.

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?

The description covers the core behavior and important edge cases (clipping, error condition). However, it does not specify the full return value format beyond mentioning returned width/height, and there is no output schema to fill this gap. For a tool that likely returns image data or a reference, this missing detail prevents a perfect score.

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%, with region fields and window_id already well-documented (e.g., window-relative coordinates, omission behavior). The tool description adds context about clipping and actual captured size, but this is more behavioral than parameter-specific. It does not add meaning that the schema already provides.

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 opens with a specific verb and resource: 'Capture the app window (or an optional window-relative region) as a screenshot (lossless WebP image).' This clearly states what the tool does and the output format. It distinguishes the tool from siblings like glass_diff or glass_a11y_snapshot by focusing on raw image capture.

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 usage context is implied: use it to capture a window or a sub-region. However, there are no explicit exclusions or references to alternatives (e.g., 'use glass_wait_for_region if you need to wait'). The description focuses on behavior rather than when to choose this over a sibling tool.

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/fixed-width/glass'

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