Skip to main content
Glama

Start capturing response bodies (experimental)

browser_collect_response_body

Enable BiDi response-body collection before the target request happens, then read the captured body with browser_get_response_body and stop interception when done.

Instructions

Turn on BiDi response-body collection (network.addDataCollector). It must be switched on BEFORE the request you care about happens — a request that already completed has no body to collect. Then read it with browser_get_response_body. Measured: Firefox clones the body while handling the response-started phase, so this tool also intercepts that phase; browser_get_response_body releases the response and only then reads the body only after network.responseCompleted for that request — asking earlier blocks, and asking with no hold at all can come back as "no such network data". Clear the interception with browser_network_intercept stop when finished.

Input Schema

NameRequiredDescriptionDefault
maxSizeNoUpper bound on captured bytes per response (default 1 MB)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.5/5.0
Behavior5/5

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

Goes well beyond readOnlyHint=false, disclosing a non-obvious side effect (it also intercepts the response-started phase because Firefox clones the body there), the blocking behavior of premature reads, and a concrete failure string ("no such network data") with its cause. It also documents the lifecycle: who holds the response, who releases it, and how to clear interception.

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?

The core instruction (turn it on first) is front-loaded, and every sentence carries real operational content. One clause is garbled/duplicated ("releases the response and only then reads the body only after network.responseCompleted"), which slightly hurts scannability.

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?

Covers activation, timing, reading, error modes, and teardown for a tool with no output schema, which is nearly everything needed. The notable gap is scope: it never says whether collection applies browser-wide, per-tab, or per-request-filter, and there is no tab/target parameter to infer it from.

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%, and maxSize is already documented there with its default of 1 MB, so a baseline 3 applies. The description says nothing about maxSize or what happens when a body exceeds the bound, adding no meaning beyond 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?

Names the specific action ("Turn on BiDi response-body collection") and cites the underlying primitive network.addDataCollector. It clearly separates itself from the sibling that reads the data (browser_get_response_body) and the sibling that tears down interception (browser_network_intercept stop).

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?

Explicitly states the ordering precondition ("must be switched on BEFORE the request you care about happens") and explains why a completed request cannot be collected. It routes the agent to browser_get_response_body for reading and to browser_network_intercept stop for cleanup, so both the when and the when-not are covered.

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