Skip to main content
Glama

Capture Browser Scenario

capture_browser_scenario
Destructive

Runs scripted browser scenarios to drive app flows when passive observation is insufficient, capturing selected artifacts and network data for analysis.

Instructions

Run a controlled browser scenario when passive observation cannot exercise the application. Launch the selected executable or connect to a loopback CDP target, provide a start URL and actions, and select storage or artifacts when needed. Environment, empty storage, and a URL-only final capture are defaults. capture.network selects request_body, response_body, and header_values independently; selected content is returned inline with transaction and event references, byte digests, and explicit unavailable states. Credentials and declared secrets are redacted. Agents can run their own local fixture servers to control application responses. Actions run until completion or cancellation unless timeout_ms is set. Results are returned inline.

Example tool call

This call uses example arguments supplied in the tool’s input schema.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "actions": [
        {
          "action": "wait_for_timeout",
          "step_id": "settle",
          "duration_ms": 250
        }
      ],
      "browser": {
        "mode": "launch",
        "executable_path": "/opt/chromium/chrome"
      },
      "start_url": {
        "url": "https://app.example.test/",
        "query": []
      }
    },
    "name": "capture_browser_scenario"
  }
}

Input Schema

NameRequiredDescriptionDefault
actionsYesRequired sequence of explicit browser actions.
browserYesRequired launch/connect selection. Launch uses the selected executable and an owned temporary profile; connect uses one loopback CDP endpoint and target.
captureNoOptional retained artifacts and event families. Defaults to only a final sanitized URL; request screenshots, DOM, accessibility, history, storage, and event capture explicitly.
secretsNoOptional environment-variable references for values used in actions, URLs, storage, or replay, and for redacting matching observed text. Secret values are never supplied inline.
storageNoOptional initial cookies, local storage, or session storage. Defaults to empty; every supplied value and origin must be declared and within the allowed origins.
start_urlYesRequired initial HTTP(S) URL. Query values must be declared separately as public literals or secret references.
environmentNoOptional deterministic browser settings. Defaults to 1280x720, en-US, UTC, light mode, reduced motion, and blocked service workers.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.1/5.0
Behavior4/5

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

With destructiveHint=true and openWorldHint=true already declared, the description adds real substance: what the defaults are (environment, empty storage, URL-only final capture), that capture.network toggles request_body/response_body/header_values independently, that credentials and declared secrets are redacted, and that actions run until completion or cancellation unless timeout_ms is set. It does not explicitly restate that the run mutates real application state or how the temporary profile is cleaned up, which is the one gap for a destructive write-capable tool.

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?

Purpose and the when-to-use condition are front-loaded, and each subsequent sentence covers a distinct facet (defaults, capture flags, redaction, fixtures, timeouts). There is minor redundancy — 'selected content is returned inline' and the closing 'Results are returned inline' say overlapping things, and the sentence is overpacked with clauses.

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?

The tool has 7 parameters (3 required), a deeply branched action union, and no output schema, so the description must carry the return-shape burden — and it does, describing inline content with transaction/event references, byte digests, and explicit unavailable states, plus the redaction guarantee. What is missing is any statement about failure modes or partial-completion behavior for a multi-step action sequence.

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 schema's own descriptions already cover the launch/connect selection, capture defaults, storage origins, and timeout semantics, so the description largely restates structured text. It does add mild value by calling out that capture.network sub-flags are selected 'independently' and by summarizing the default capture set in one line, but it introduces no syntax or format detail absent from the schema.

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 opening sentence gives a specific verb+resource ('Run a controlled browser scenario') and immediately scopes it against the passive-capture sibling class ('when passive observation cannot exercise the application'), which is exactly the distinction an agent needs given capture_web_screenshot and inspect_web_network_capture in the catalog. The launch-vs-connect branching is also spelled out in the same paragraph.

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

Usage Guidelines4/5

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

It states an explicit use condition — active driving when passive observation is insufficient — and adds a non-obvious positive case ('Agents can run their own local fixture servers to control application responses'). It stops short of naming a specific alternative tool to use instead when passive capture suffices, so selection is inferred from the sibling catalog rather than stated.

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