Skip to main content
Glama

browser_route_intercept

Intercept network requests matching URL patterns to mock responses or simulate network failures via CDP Fetch, enabling controlled testing without backend changes.

Instructions

Intercept network requests matching a URL pattern to mock responses (status, body, headers) or emulate network failures via CDP Fetch domain.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "browser_route_intercept"
  }
}

Input Schema

NameRequiredDescriptionDefault
bodyNoResponse body string or JSON to return
actionNoInterception action: 'mock' (add mock rule), 'clear' (remove all mock rules and disable interception), 'list' (view active rules)mock
headersNoOptional HTTP response headers dict (e.g. {'content-type': 'application/json'})
status_codeNoHTTP status code to return when mocking (default 200)
url_patternNoURL pattern to match (e.g. '*api/v1/users*', 'https://example.com/checkout*')*
error_reasonNoOptional network error reason to fail request with (e.g. 'Failed', 'Aborted', 'ConnectionRefused', 'AccessDenied')

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.13.0

TDQS

B3.4/5.0
Behavior3/5

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

No annotations are provided, so the description carries the full behavioral burden. It usefully discloses the underlying mechanism (CDP Fetch domain) and that failures can be emulated, but leaves out important traits: whether rules persist across navigations or contexts, whether interception applies only to future requests, whether it requires an active browser connection, and whether multiple mock rules stack or override.

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?

A single dense sentence with no filler, front-loading the core action and the pattern-matching scope before the two modes of operation. It is slightly over-packed, but nothing is wasted or redundant.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 6-parameter tool with global network side effects, no annotations, and no output schema, the description is thin. It never addresses the notable hazard that calling with defaults (action='mock', url_pattern='*') intercepts every request, nor what 'list' returns, so an agent could invoke it destructively without warning.

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%, so the schema already documents every parameter including the action enum and url_pattern examples; baseline 3 applies. The description's parenthetical '(status, body, headers)' merely restates parameter names already documented and adds no format or precedence semantics beyond the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource ('Intercept network requests matching a URL pattern') and names the two capabilities: mocking responses with status/body/headers, or emulating network failures via CDP Fetch. An agent knows exactly what the tool does, though it does not explicitly differentiate itself from adjacent siblings such as browser_block_urls or browser_block_resources.

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?

Usage is only implied: an agent can infer this is for testing/mocking scenarios from 'mock responses' and 'emulate network failures'. There is no explicit when-to-use, no statement of when to prefer browser_block_urls or browser_cdp_send instead, and no note that the three actions ('mock'/'clear'/'list') represent distinct operating modes an agent must choose between.

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