Skip to main content
Glama
Browser Session MCP

Browser Session MCP

take_screenshot

Read-only

Capture a PNG of the browser session's active tab or a single element to inspect visual layout, styling, or images. Reads the page without changing it; optionally save to a file or capture the full scrollable page.

Instructions

Capture a PNG of the session's active tab, or one element of it, and return it as an image or, with save, as a file path. Use it when visual layout, styling or images matter; use take_snapshot for a cheaper text view of the page's structure, and evaluate to read specific values. fullPage captures the whole scrollable page instead of the visible viewport, which can make a very large image on long pages. It reads the page without changing it. Returns the image plus a caption with its size in bytes.

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": {
      "sessionId": "<sessionId>"
    },
    "name": "take_screenshot"
  }
}

Input Schema

NameRequiredDescriptionDefault
saveNoSave the PNG to a file on the host (under $STATE_DIR/screenshots/, kept after the session closes) and return { path, bytes } instead of the image, for callers that can't take an image (a sandbox) or want the file. Default false.
scaleNoResize the image by this factor, 0.05 to 4 (e.g. 0.5 for a smaller file). Default 1.
fullPageNoCapture the whole scrollable page instead of only the visible viewport. Default false.
selectorNoCapture only this element (CSS or `jev:` plain language), scrolled into view.
sessionIdYesThe id returned by open_browser_session. Errors if no open session has it.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changedv0.1.23
    • addedInput schema / properties / save
      Added value: +{
      +  "description": "Save the PNG to a file on the host (under $STATE_DIR/screenshots/, kept after the session closes) and return { path, bytes } instead of the image, for callers that can't take an image (a sandbox) or want the file. Default false.",
      +  "type": "boolean"
      +}
    • addedInput schema / properties / scale
      Added value: +{
      +  "description": "Resize the image by this factor, 0.05 to 4 (e.g. 0.5 for a smaller file). Default 1.",
      +  "type": "number"
      +}
    • addedInput schema / properties / selector
      Added value: +{
      +  "description": "Capture only this element (CSS or `jev:` plain language), scrolled into view.",
      +  "type": "string"
      +}
  2. Changed2 schema fields changed
    • addedInput schema / properties / fullPage / description
      Added value: +"Capture the whole scrollable page instead of only the visible viewport. Default false."
    • addedInput schema / properties / sessionId / description
      Added value: +"The id returned by open_browser_session. Errors if no open session has it."
  3. First observedv0.1.2

TDQS

A4.2/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true and openWorldHint=false, so the safety profile is largely covered; the description reinforces this with 'reads the page without changing it.' It adds some value by describing the return shape (image plus a caption with byte size) but duplicates save-file persistence details already present in the schema.

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?

Front-loaded with the action and return format, then alternatives, then the fullPage caveat. Dense but every clause carries information, though the return-format sentence at the end could be folded into the opening.

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?

With no output schema, the description correctly explains what comes back: the PNG itself or a { path, bytes } file result, plus a caption with byte size. Combined with full annotation and schema coverage for a five-parameter tool, nothing an agent needs to invoke it correctly is missing.

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%, so every parameter including save, scale, fullPage, selector and sessionId is already documented in structured form. The description adds only marginal meaning, chiefly the warning that fullPage can yield a very large image; otherwise it restates the schema's own explanation of save and fullPage.

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?

States a specific verb and resource (capture a PNG of the active tab or a single element) and explicitly contrasts itself with take_snapshot and evaluate. An agent can distinguish it from the text-structure sibling without opening either schema.

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

Usage Guidelines5/5

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

Gives an explicit use condition (when visual layout, styling or images matter) and names the alternatives with their selection criteria: take_snapshot for a cheaper text view, evaluate for reading specific values. It also flags the fullPage tradeoff of producing a very large image on long pages.

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