Skip to main content
Glama

screenshot_by_uid

Read-only

Capture a screenshot of a specific browser element by its UID as base64 PNG, or save it directly to a file for inspection and debugging.

Instructions

Capture element screenshot by UID as base64 PNG.

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": {
      "uid": "<uid>"
    },
    "name": "screenshot_by_uid"
  }
}

Input Schema

NameRequiredDescriptionDefault
uidYesElement UID from snapshot
saveToNoSave the screenshot to a file instead of returning it as image data in the response. Pass a file path, an existing directory (generated file inside), or true (generated file under ~/.firefox-mcp/output/). Relative paths resolve against the current working directory.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.11.0
    • changedInput schema / properties / saveTo / description
      Previous value: -"Save the screenshot to a file instead of returning it as image data in the response. Pass a file path, an existing directory (generated file inside), or true (generated file under ~/.firefox-devtools-mcp/output/). Relative paths resolve against the current working directory."New value: +"Save the screenshot to a file instead of returning it as image data in the response. Pass a file path, an existing directory (generated file inside), or true (generated file under ~/.firefox-mcp/output/). Relative paths resolve against the current working directory."
  2. Changed2 schema fields changedv0.9.15
    • changedInput schema / properties / saveTo / description
      Previous value: -"Optional file path to save the screenshot to instead of returning it as image data in the response."New value: +"Save the screenshot to a file instead of returning it as image data in the response. Pass a file path, an existing directory (generated file inside), or true (generated file under ~/.firefox-devtools-mcp/output/). Relative paths resolve against the current working directory."
    • changedInput schema / properties / saveTo / type
      Previous value: -"string"New value: +[
      +  "boolean",
      +  "string"
      +]
  3. Changed1 schema field changedv0.9.3
    • addedInput schema / properties / saveTo
      Added value: +{
      +  "description": "Optional file path to save the screenshot to instead of returning it as image data in the response.",
      +  "type": "string"
      +}
  4. Changed1 schema field changedv1.0.0
    • changedInput schema / properties / uid / description
      Previous value: -"The UID of the element to screenshot"New value: +"Element UID from snapshot"
  5. First observed

TDQS

B3.2/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true, so safety is covered. The description adds that output is base64 PNG, which is genuinely useful return-format context absent from annotations. However, it doesn't flag that base64 is only the default and that saveTo changes the response shape, nor does it describe failure behavior for stale UIDs.

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?

A single front-loaded sentence with no wasted words. It is efficient, though so terse that it offers no structure for the agent to scan beyond the one clause.

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 low-complexity, 2-parameter tool with full schema coverage, no output schema, and a readOnly annotation, the description is adequate. It nonetheless omits the relationship to snapshot/UID lifetime and to screenshot_page, which an agent selecting between capture tools would want.

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 coverage is 100%, and the saveTo description in the schema is notably thorough (file path, directory, true, relative path resolution). The description adds no parameter meaning beyond it, so the baseline 3 applies.

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 ('Capture') and a scoped resource ('element screenshot by UID'), which implicitly separates it from the page-level sibling screenshot_page. It stops short of naming that sibling or explaining the distinction explicitly.

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 guidance on when to choose this over screenshot_page, or what preconditions apply (e.g., that the UID must come from a current snapshot). The agent must infer usage from the name alone.

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