Skip to main content
Glama

browser_intercept_request

Intercept and modify outgoing browser requests in real-time via Chrome CDP. Inject custom headers or block matching URLs using regex patterns.

Instructions

Intercept and modify OUTGOING browser requests in real-time via Chrome CDP Fetch API.

PREREQUISITE: browser_open must have been called first.

IMPORTANT — This is DIFFERENT from add_interception_rule (proxy-level):

  • browser_intercept_* = instant, browser-only, via Chrome CDP. Changes take effect immediately.

  • add_interception_rule = proxy-level, ~5s cache delay, applies to ALL traffic (browser + code-mode).

Available actions:

  • "inject_header": Add a custom header to matching requests. Example: browser_intercept_request(url_pattern=".api.", action="inject_header", key="X-Admin", value="true")

  • "block": Block matching requests entirely (returns network error to the page). Example: browser_intercept_request(url_pattern=".analytics.", action="block")

Args: url_pattern: Regex pattern to match request URLs (e.g. ".api.target.com.") action: "inject_header" or "block" key: Header name (required for inject_header) value: Header value (required for inject_header) session_name: Browser session to use (default: "default")

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
keyNo
valueNo
actionYes
url_patternYes
session_nameNodefault

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior4/5

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

With no annotations, the description carries the full burden and discloses key behavioral traits: immediate effect, browser-only scope, and what 'block' does (returns network error). It could add details on side effects like rule persistence or interaction with intercept_disable, but the provided behavior is clear 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 well-structured with sections for purpose, prerequisite, comparison, actions, and args. It is front-loaded and every sentence adds value, including the comparative note and examples, without redundancy.

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 the tool's moderate complexity, the description covers all essential aspects: purpose, prerequisite, differentiation from sibling, actions, args, and examples. An output schema exists, so no need to detail return values. The description is comprehensive enough for correct invocation.

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

Parameters5/5

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

Schema has 0% description coverage, so the description fully compensates. All five parameters are explained, including regex pattern examples, action options, required conditions for key/value, and default for session_name. The inline examples make usage concrete.

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 the tool intercepts and modifies outgoing browser requests in real-time via Chrome CDP Fetch API. It also distinguishes itself from the sibling add_interception_rule, making its unique purpose unambiguous.

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 provides a prerequisite (browser_open must be called), and contrasts with add_interception_rule by explaining when to use each (instant browser-only vs. proxy-level with ~5s delay). It also gives usage examples for each action, effectively guiding when and how to invoke.

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/BobongKu/nodriver-proxy-mcp'

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