Skip to main content
Glama

browser_screenshot_element

Capture a screenshot of a specific DOM element using a CSS selector to visually verify or document a single page component.

Instructions

Take a screenshot of a specific DOM element identified by a CSS selector

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "selector": "<selector>"
    },
    "name": "browser_screenshot_element"
  }
}

Input Schema

NameRequiredDescriptionDefault
selectorYesCSS selector of the target element

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv2.0.0

TDQS

B3.2/5.0
Behavior2/5

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

With no annotations, the description carries the full behavioral burden and discloses almost nothing beyond the name: not what happens if the selector matches nothing or multiple nodes, whether the element is scrolled into view first, or whether hidden/zero-size elements error. It also doesn't say the result is an image payload.

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?

One tight sentence with the key scope qualifier ('specific DOM element') front and center and zero filler. It's efficient, though the lack of any second clause means brevity comes at the cost of the missing behavioral detail.

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

Completeness3/5

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

For a one-parameter read operation with a fully described schema, the description is just about adequate, but with no annotations and no output schema it should mention that the return is an image and what a failed match does. The core intent is covered; failure modes are not.

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 the single 'selector' parameter is already fully documented as 'CSS selector of the target element'. The description restates that same meaning without adding syntax constraints, matching behavior, or selector-resolution details, so it earns the baseline 3.

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?

States a specific verb+resource combination ('Take a screenshot of a specific DOM element') and narrows scope to a single element via a CSS selector, which implicitly separates it from browser_screenshot_fullpage and browser_screenshot. It never names those siblings, so the differentiation is left to inference rather than explicit.

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?

Usage is only implied: an agent can infer this is the tool for element-scoped captures rather than page-level ones. There is no explicit 'use X when you need the full page' routing despite two closely related screenshot siblings (browser_screenshot, browser_screenshot_fullpage) where confusion is likely.

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