Skip to main content
Glama

network_add_mock

Intercept and mock network requests in a browser tab by defining URL patterns, HTTP methods, and custom response codes, headers, and bodies.

Instructions

Add a network mock rule that intercepts matching requests.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
methodNoHTTP method to match (optional, matches all if omitted)
targetIdYesTarget ID of the tab
urlPatternYesURL pattern to match (supports * and ** glob wildcards)
responseBodyNoResponse body string
responseCodeYesHTTP response code to return
responseHeadersNoResponse headers as key-value pairs

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.1.0

TDQS

C2.9/5.0
Behavior2/5

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

No annotations are provided, so the description must carry the full behavioral burden. It only says 'adds a rule' with no mention of side effects (e.g., overriding existing rules, affecting all future requests in the tab, or needing the tab to be alive). No disclosure of persistence, scoping, or state changes beyond the obvious mutation.

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 description is a single sentence with no filler, front-loading the core action. It is concise, though it could include more behavioral context without becoming verbose. It earns a 4 for being tightly written and avoiding repetition of schema details.

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

Completeness2/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 no output schema and no annotations, the description is too thin. It doesn't explain what happens on success, whether mocks persist, how they are matched (beyond the schema's wildcard note), or how they relate to other network tools. An agent would lack enough context to anticipate the tool's full effect.

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 input schema has 100% description coverage for all six parameters, so the schema already documents each parameter's meaning. The description adds no extra parameter insight; it doesn't explain the interaction between parameters (e.g., how method filters combine with urlPattern). Baseline 3 applies since the schema handles parameter semantics well.

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 clear action ('Add a network mock rule') and a behavioral outcome ('intercepts matching requests'). It distinguishes from siblings like network_remove_mock and network_list_mocks by indicating the add action, though it doesn't explicitly name alternatives. The purpose is evident without needing to open the schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

There is no guidance on when to use this tool versus alternatives. It doesn't mention that mocks are temporary, how they interact with other mock tools, or when adding a mock is appropriate (e.g., to simulate a response). The description gives no context for selection among the network_* siblings.

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