Skip to main content
Glama

CDP: Screenshot

cdp_screenshot
Destructive

Capture the attached browser page as a screenshot via CDP, saving it to a file or returning base64; optionally capture the full scrollable page or select a tab by index or URL.

Instructions

Screenshot the attached page (to a file, or base64 with as_base64=true).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
outNoOutput filename.
tabNoTab index from cdp_tabs to act on.
urlNoPick the tab whose URL contains this substring.
portNoCDP debug port (default 9222).
as_base64NoReturn base64 image data instead of writing a file
full_pageNoCapture the whole scrollable page instead of just the viewport

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.6/5.0
Behavior3/5

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

Annotations supply the safety profile (readOnlyHint=false, destructiveHint=true), lowering the bar. The description adds that a file may be written to disk (a side effect consistent with destructiveHint) or base64 returned, but says nothing about default filename, overwrite behavior, or capture timing. It does not contradict 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.

Conciseness5/5

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

A single short sentence, front-loaded with the action and immediately followed by the output-mode distinction. Nothing extraneous.

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

Completeness4/5

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

For a six-parameter, zero-required tool with no output schema, the description covers the key behavioral fork (file vs base64) and the schema covers targeting parameters. It says nothing about the return payload shape when a file is written, but otherwise an agent has enough to invoke it.

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 schema already documents all six parameters. The description only restates as_base64 (and implies out), adding no format, path, or targeting detail beyond the schema. 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?

Clear specific verb+resource: 'Screenshot the attached page'. It also states the two output modes. It does not name or distinguish itself from the sibling desktop_screenshot or cdp_snapshot, so it stays short of a 5.

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: 'the attached page' signals this requires an already-attached CDP browser session, and the parenthetical hints when to use out vs as_base64. There is no explicit when-to-use, prerequisite, or alternative tool named (e.g., desktop_screenshot for non-CDP targets).

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

Deploy Server

Other Tools