Skip to main content
Glama

capture_element_screenshot

Capture element-specific screenshots from live pages by targeting CSS selectors or node IDs, preserving exact geometry and device pixel ratio for accurate UI inspection.

Instructions

Capture an element-specific screenshot bounded to the target element exact geometry and device pixel ratio.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nodeIdNoLogicalNodeId of the target element
selectorNoCSS selector of the target element
selectedElementRefNoSelected element reference token

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. First observedv2.0.0

TDQS

B3.1/5.0
Behavior3/5

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

With no annotations, the description itself carries the burden of explaining behavior. It adds some useful behavioral context beyond the tool name: the screenshot is bound to the element's exact geometry and accounts for the device pixel ratio. However, it does not disclose whether the screenshot is returned directly, saved, or how it compares to a full-page capture.

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?

The description is a single sentence that front-loads the core action. There is no wasted text, though the phrasing 'target element exact geometry' is slightly awkward and could be more polished. Overall it is concise and scannable.

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

Completeness2/5

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

Given three optional targeting parameters, no output schema, and no annotations, the description is too thin for reliable invocation. It does not state how to obtain or choose between nodeId, selector, and selectedElementRef, nor what the tool returns. An agent would likely need to consult sibling tools or documentation to use it correctly.

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 three parameters have individual descriptions. The tool description adds no meaning beyond the schema, but it also does not need to, since the schema already documents nodeId, selector, and selectedElementRef. The main gap is that the description does not explain how the three targeting parameters relate or which one to prefer.

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 uses a specific verb and resource: 'Capture an element-specific screenshot'. The phrase 'element-specific' helps distinguish it from sibling tools like capture_page_screenshot, though it does not explicitly name that alternative. The inclusion of 'bounded to the target element exact geometry and device pixel ratio' further clarifies scope.

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

Usage Guidelines2/5

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

No explicit guidance is given on when to use this tool versus alternatives such as capture_page_screenshot or get_screenshots. The reader can infer utility from the purpose, but there is no stated exclusion, alternative, or prerequisite. This lack of routing guidance leaves the agent to guess among the many screenshot-related sibling tools.

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

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/IrMaho/Mcp-DOM'

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