Skip to main content
Glama

capture-screenshot

Capture a screenshot of the current page or a specific CSS element. Optionally navigate to a URL before capturing. Returns a resource URI for the screenshot, with optional base64 encoding when enabled.

Instructions

Captures a screenshot of the current page or a specific element. Stores the screenshot in the MCP resource system and returns a resource URI. If ENABLE_BASE64 environment variable is set to 'true', also includes base64 encoded image in the response.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
selectorNoCSS selector to capture (captures full page if not provided)
urlNoURL to navigate to before capturing screenshot. Do not provide if you want to capture the current page.
contextIdNoBrowser ID to capture from (uses most recent browser if not provided)
Behavior4/5

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

With no annotations provided, the description carries the full burden. It discloses key behaviors: storing in the MCP resource system, returning a URI, optionally providing base64 based on environment variable, and the ability to capture specific elements or navigate to a URL first. This is transparent and sufficient.

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 three sentences, each adding distinct information: core functionality, storage and return, and environmental optionality. No unnecessary words; it is well-structured and front-loaded.

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?

Given three optional parameters and no output schema, the description covers all essential aspects: what the tool does, how parameters work, what the return includes (URI, optional base64). It fully addresses the needs for correct invocation.

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

Parameters4/5

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

The input schema already describes all three parameters (selector, url, contextId) well. The description adds value by explaining that omitting selector captures full page, url navigates before capture, and contextId defaults to most recent browser. This enriches the bare schema definitions.

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 'Captures a screenshot of the current page or a specific element', providing a specific verb and resource. It distinguishes from sibling tools (e.g., browser-evaluate, close-browser) which have different purposes, making the tool's role unambiguous.

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?

The description explains how screenshots are stored and returned, but does not explicitly guide when to use this tool versus alternatives like browser-evaluate for visual inspection. It would benefit from stating that this is for visual capture rather than script-based evaluation.

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

Install Server

Other Tools

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/ESnark/blowback'

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