Skip to main content
Glama

glass_screenshot

Read-only

Capture a window or sub-region as lossless WebP to verify the current visual state.

Instructions

Capture current visual evidence as lossless WebP, not semantic state or transition completion. Off-display captures are clipped: returned dimensions disclose the actual size; fully off-screen surfaces error. Optional window_id observes without switching the active window.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
regionNoOptional window-relative sub-rectangle to capture; omit for the whole window.
max_widthNoMaximum returned image width; shrinks after crop, preserving native comparison pixels.
window_idNoObserve this current glass_list_windows ID without selecting it; omit for active window.
max_heightNoMaximum returned image height; omit both limits for native output.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed7 schema fields changedv1.8.0
    • changedInput schema / $defs / RegionArgs / properties / height / description
      Previous value: -"Height in pixels, extending down from `y`."New value: +"Height in pixels."
    • changedInput schema / $defs / RegionArgs / properties / width / description
      Previous value: -"Width in pixels, extending right from `x`."New value: +"Width in pixels."
    • changedInput schema / $defs / RegionArgs / properties / x / description
      Previous value: -"Left edge in pixels, window-relative — 0 is the window's left edge, not the screen's."New value: +"Left edge in window-relative pixels."
    • changedInput schema / $defs / RegionArgs / properties / y / description
      Previous value: -"Top edge in pixels, window-relative — 0 is the window's top edge, not the screen's."New value: +"Top edge in window-relative pixels."
    • addedInput schema / properties / max_height
      Added value: +{
      +  "description": "Maximum returned image height; omit both limits for native output.",
      +  "format": "uint32",
      +  "maximum": 4294967295,
      +  "minimum": 1,
      +  "type": [
      +    "integer",
      +    "null"
      +  ]
      +}
    • addedInput schema / properties / max_width
      Added value: +{
      +  "description": "Maximum returned image width; shrinks after crop, preserving native comparison pixels.",
      +  "format": "uint32",
      +  "maximum": 4294967295,
      +  "minimum": 1,
      +  "type": [
      +    "integer",
      +    "null"
      +  ]
      +}
    • changedInput schema / properties / window_id / description
      Previous value: -"Capture/observe this window (id from `glass_list_windows`) instead of the\nactive one, without changing which window subsequent ops target. Omit for\nthe active window."New value: +"Observe this current glass_list_windows ID without selecting it; omit for active window."
  2. Addedv1.2.0
  3. Removedv1.1.0
  4. Addedv1.0.3
  5. Removedv1.0.3
  6. First observedv1.0.1

TDQS

A4.5/5.0
Behavior5/5

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

Annotations already declare readOnlyHint=true, and the description adds significant behavioral context beyond that: output format (lossless WebP), clipping behavior for off-display captures, error conditions for fully off-screen surfaces, and the non-intrusive nature of window_id. No contradictions with annotations.

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 sentences with zero waste. The core purpose is front-loaded, followed by two high-value behavioral notes. Every sentence earns its place, and the structure is highly scannable.

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

Completeness5/5

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

The description is complete for a screenshot tool with no output schema. It covers output format, clipping and error behavior, and window selection semantics. An agent has everything needed to invoke it correctly and interpret results. No gaps that would cause mis-calls.

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 each parameter (region, max_width, window_id, max_height) is already documented. The description adds minimal extra parameter-specific meaning—the window_id observation behavior is already in the schema. It does clarify overall output behavior (dimensions disclosure) but that is not parameter semantics. Baseline 3 is appropriate.

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 states a specific action ('Capture current visual evidence as lossless WebP') and clearly distinguishes it from 'semantic state or transition completion', which sets it apart from sibling tools like glass_a11y_snapshot or glass_wait_for_region. This is a precise verb+resource statement that leaves no ambiguity about the tool's function.

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 implies when to use it ('when you need visual evidence') and explicitly contrasts it with semantic state checks. It also provides guidance on window_id usage ('observes without switching the active window'). However, it does not name specific alternative tools or explicit exclusion conditions, so it falls short of a perfect 5.

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