Skip to main content
Glama

Intercept network

network_mock

Add, list, or remove per-tab request interception rules to block matching calls, return fake responses, or rewrite headers during browser sessions.

Instructions

Adds, lists or removes interception rules for the tab: block matching requests, answer them with a fake response, or rewrite request headers. Rules are removed when the session ends.

Input Schema

NameRequiredDescriptionDefault
idNoRule id (action remove).
blockNoFail matching requests (action add).
tabIdNoTab to act on. Defaults to the session target tab (see tab_select).
actionYesWhat to do.
methodNoOnly this HTTP method.
respondNoAnswer matching requests with this fake response (action add).
setHeadersNoRequest headers to add or override.
urlPatternNoGlob pattern for request URLs, "*" matches anything (action add).
resourceTypeNoOnly this resource type, e.g. "XHR", "Fetch", "Image".

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.5/5.0
Behavior3/5

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

The annotations already mark this as a non-read-only, open-world tool, so the main added behavioral detail is that rules are removed when the session ends. That is useful lifecycle context, but the description does not explain rule precedence, immediate application, or what clear/list return.

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 two sentences, front-loaded with the core operation and followed by the key lifecycle constraint. There is no filler, and every sentence carries useful information.

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?

The description covers the main purpose and session-bound lifetime, which suits a moderately complex, schema-rich tool. It stops short of explaining the clear action, list output, or practical usage relative to sibling network tools, so it is adequate but not fully complete.

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 all nine parameters thoroughly. The description adds only high-level mapping to block/respond/rewrite behavior and does not explain clear, id, tabId, method, urlPattern, resourceType, or nested response fields beyond what the schema provides.

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?

The description states a specific resource and set of operations: interception rules for a tab, including blocking, fake responses, and header rewriting. It is clear enough to distinguish from general network inspection siblings, but it does not explicitly name alternatives such as network_requests or network_har.

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 implied by the listed capabilities: block matching requests, return a fake response, or rewrite headers. However, the description does not explicitly say when to choose this tool over network_request, network_requests, or network_har, and it gives no exclusions or prerequisites.

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