Skip to main content
Glama

net_intercept_add

Add a network intercept rule to block a request, mock a response, or modify request headers. Matches by URL substring; first match wins.

Instructions

Add a network intercept rule via CDP Fetch: block a request, mock its response, or modify its headers. Matches when urlPattern is a substring of the request url; the first matching rule wins. Enables interception lazily on first use.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
bodyNomock: response body
actionYes
statusNomock: response status code (default 200)
sessionIdNo
setHeadersNomodify: headers to set/override on the outgoing request
urlPatternYessubstring match against the request url
contentTypeNomock: response content-type (default application/json)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.6.0

TDQS

A4.1/5.0
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 adds meaningful behavioral context: it names the CDP Fetch mechanism, explains that urlPattern is a substring match, states that the first matching rule wins, and discloses lazy interception enablement. It does not cover rule persistence or session scoping, but the key behavioral traits are disclosed.

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?

Three short sentences, each earning its place: the core action, the matching semantics, and the lazy-enable behavior. The most important information is front-loaded with no filler.

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?

Core calling behavior is well covered, but with no annotations, no output schema, and an undocumented sessionId, the agent is left to infer rule lifetime, session scope, and what the tool returns. The sibling net_intercept_clear implies persistence, but the description does not connect the two.

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?

The schema already documents 5 of 7 parameters, and the description adds action-mode semantics and first-match ordering. However, sessionId is left entirely undocumented in both the schema and description, and the per-action parameter dependencies are only implied by the schema prefixes rather than explained.

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 opens with a specific verb and resource: 'Add a network intercept rule via CDP Fetch', then enumerates the three concrete behaviors (block, mock, modify). This clearly distinguishes it from listing or clearing intercept rules and from other network tools like throttling.

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?

The description gives clear context for when the tool applies: adding an intercept rule that can block, mock, or modify requests, with substring matching and first-match-wins behavior. It does not explicitly name alternatives like net_intercept_list or net_intercept_clear, but the usage context is unambiguous.

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