Skip to main content
Glama

mock_network

Destructive

Intercept network requests matching a URL pattern and return custom responses to isolate frontend testing of API calls.

Instructions

[Agent Browser] Mock network requests matching a URL pattern. Use for frontend isolation testing by intercepting and mocking API calls. Pattern uses glob matching (e.g., '**/api/users*'). Response body is returned as-is.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "url_pattern": "<url_pattern>",
      "response_body": "<response_body>"
    },
    "name": "mock_network"
  }
}

Input Schema

NameRequiredDescriptionDefault
statusNo
url_patternYes
content_typeNoapplication/json
response_bodyYes

Output Schema

NameRequiredDescriptionDefault
dataNo
hintsNo
messageNo
successNo
suggestionsNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.3.0

TDQS

A3.6/5.0
Behavior3/5

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

Annotations already flag destructiveness (destructiveHint=true) and mutability, so the description does not need to restate that. It usefully adds glob pattern syntax with a concrete example and states that the response body is passed through unchanged. However, it never explains what the destructive behavior actually is — whether registering a mock overwrites an existing one for the same pattern or persists until explicitly cleared.

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?

Three short sentences with the core action front-loaded, followed by usage context and then the pattern/response semantics. No filler; the only redundancy is the bracketed namespace prefix, which is harmless.

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?

An output schema exists, so return-value explanation is not required. But for a destructive, state-changing tool with zero schema description coverage, the definition omits how the mock persists, whether it replaces prior mocks, and what status/content_type control — gaps an agent would have to guess at.

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 0%, so the description must carry the parameter burden and it only partially does: it clarifies url_pattern (glob matching, with an example) and response_body (returned as-is). The status and content_type parameters, both with defaults, are left entirely undocumented in the schema and the description.

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 gives a specific verb and resource: 'Mock network requests matching a URL pattern.' An agent can immediately tell this registers a network interception rather than navigating or asserting. It stops short of naming the sibling it complements (clear_mocks) or the related network tool, so differentiation is implicit rather than explicit.

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?

'Use for frontend isolation testing by intercepting and mocking API calls' supplies a clear when-to-use context. There is no when-not-to guidance and no mention of the teardown step (clearing mocks) or alternatives, which keeps it below a 5.

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