Skip to main content
Glama

glass_screenshot

Read-only

Capture lossless WebP screenshots of GUI windows or regions, with optional accessibility annotations, for visual debugging and inspection without switching the active window.

Instructions

Capture current visual evidence as lossless WebP, not semantic state or transition completion. annotations:accessibility adds numbered elements and an untrusted legend for the active window, refreshing actionable IDs. Requires an accessibility tree. 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; unavailable with annotations.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "glass_screenshot"
  }
}

Input 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.
annotationsNo"accessibility" overlays numbered elements and a legend; active window only.
require_fullNoFail if the backend cannot prove the entire requested window/region was captured. Independent of preview resizing.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv1.10.0
    • addedInput schema / properties / annotations
      Added value: +{
      +  "description": "\"accessibility\" overlays numbered elements and a legend; active window only.",
      +  "enum": [
      +    "accessibility",
      +    null
      +  ],
      +  "type": [
      +    "string",
      +    "null"
      +  ]
      +}
    • addedInput schema / properties / require_full
      Added value: +{
      +  "default": false,
      +  "description": "Fail if the backend cannot prove the entire requested window/region was captured. Independent of preview resizing.",
      +  "type": "boolean"
      +}
  2. 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."
  3. Addedv1.2.0
  4. Removedv1.1.0
  5. Addedv1.0.3
  6. Removedv1.0.3
  7. First observedv1.0.1

TDQS

A4.6/5.0
Behavior5/5

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

Adds substantial behavior beyond the readOnly/openWorld annotations: lossless WebP format, the accessibility-tree requirement, that annotations refresh actionable IDs and deliver an untrusted legend, off-display clipping with true dimensions returned, hard errors on fully off-screen surfaces, and window_id observing without switching the active window. These are exactly the operational constraints an agent needs and none of it is in the annotations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loads the core purpose and packs dense, useful constraints into a handful of clauses with almost no filler. The compact telegraphic style ("annotations:accessibility adds...") slightly hurts readability but wastes little space.

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?

With no output schema, the description compensates by explaining the return format (lossless WebP), how returned dimensions disclose actual captured size under clipping, and error behavior for fully off-screen surfaces. Combined with the parameter interaction notes, this is complete enough for correct invocation.

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 coverage is 100%, so the baseline is 3, but the description earns more by clarifying cross-parameter semantics the schema does not: window_id is unavailable with annotations, and annotations adds an untrusted legend with refreshed IDs. Region and max_width/max_height semantics remain solely in the schema, so it is not exhaustive.

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 and resource — "Capture current visual evidence as lossless WebP" — and explicitly distinguishes itself from semantic state (a11y snapshot) and transition completion (wait_stable) captures. An agent can tell what this tool produces versus sibling read tools without opening a schema.

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?

Clearly frames when to reach for this tool by excluding semantic-state and transition-completion use cases, and gives concrete conditions for annotations, window_id, and off-screen surfaces. It stops short of naming the specific sibling alternatives (e.g. glass_a11y_snapshot, glass_wait_stable) an agent should pick instead, so routing is implied rather than explicit.

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