Skip to main content
Glama

element_screenshot

Read-onlyIdempotent

Capture a cropped screenshot of a specific element or viewport region, with optional scaling for readability.

Instructions

Screenshot cropped to one element or to a viewport region (PNG), optionally enlarged. Read-only. The cheapest image in the set, because it carries only the box you asked for — and with scale the way to read fine print: crop the box, zoom it, verify.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
scaleNoEnlargement of the crop, 1-4; output still capped at 1568px
regionNoBox in viewport CSS px (the rect frame of get_interactives/query_dom), instead of selector
tab_idNoTarget tab; omitted = last tab navigated in this session, else the active one
selectorNoCSS selector; ">>>" pierces shadow DOM. The element is scrolled into view first

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changedv1.16.1
    • addedInput schema / properties / region
      Added value: +{
      +  "description": "Box in viewport CSS px (the rect frame of get_interactives/query_dom), instead of selector",
      +  "properties": {
      +    "height": {
      +      "type": "number"
      +    },
      +    "width": {
      +      "type": "number"
      +    },
      +    "x": {
      +      "type": "number"
      +    },
      +    "y": {
      +      "type": "number"
      +    }
      +  },
      +  "required": [
      +    "x",
      +    "y",
      +    "width",
      +    "height"
      +  ],
      +  "type": "object"
      +}
    • addedInput schema / properties / scale
      Added value: +{
      +  "default": 1,
      +  "description": "Enlargement of the crop, 1-4; output still capped at 1568px",
      +  "maximum": 4,
      +  "minimum": 1,
      +  "type": "number"
      +}
    • removedInput schema / required
      Removed value: -[
      -  "selector"
      -]
  2. Changed2 schema fields changedv1.10.0
    • addedInput schema / properties / selector / description
      Added value: +"CSS selector; \">>>\" pierces shadow DOM. The element is scrolled into view first"
    • addedInput schema / properties / tab_id / description
      Added value: +"Target tab; omitted = last tab navigated in this session, else the active one"
  3. First observedv1.8.0

TDQS

A4.8/5.0
Behavior5/5

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

The description explicitly says 'Read-only,' matching the readOnlyHint and destructiveHint annotations. It also discloses behavior beyond the annotations, such as optional enlargement, output being capped at 1568px, and the selector parameter noting that 'The element is scrolled into view first.'

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 front-loaded with the main purpose and keeps additional explanation compact and purposeful. The cost and scale guidance is phrased efficiently, and no sentence is redundant or filler.

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, combined with the parameter details, gives an agent enough context to call the tool correctly: what it returns (PNG), how to target an element or region, how scaling behaves, and which tab is used. No output schema is present, but the textual description sufficiently covers the output format and key invocation details.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

All four parameters have meaningful descriptions that go beyond the schema types. The scale parameter documents its default and bounds, region explains it is a viewport box in CSS pixels rather than a selector, tab_id explains fallback behavior, and selector explains shadow DOM piercing and pre-scroll behavior.

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 function: 'Screenshot cropped to one element or to a viewport region (PNG), optionally enlarged.' It also highlights the differentiating cost benefit, 'The cheapest image in the set, because it carries only the box you asked for,' which helps distinguish it from broader screenshot tools.

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 gives practical usage context by noting it is the 'cheapest image in the set' and that 'with scale the way to read fine print: crop the box, zoom it, verify.' It does not explicitly name sibling alternatives like screenshot or full_page_screenshot, but the cropping and viewport-region framing make the intended use case reasonably clear.

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