Skip to main content
Glama

Mock JSON Response

network_mock_json

Mocks matching network requests with a custom JSON response for the active page, enabling controlled API behavior during browser testing.

Instructions

Fulfill matching requests with a JSON response for the active page.

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": {
      "urlPattern": "<urlPattern>",
      "body": "<body>"
    },
    "name": "network_mock_json"
  }
}

Input Schema

NameRequiredDescriptionDefault
bodyYes
pageIdNoPage id. Defaults to the active page.
statusNo
urlPatternYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

C2.4/5.0
Behavior2/5

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

With no annotations, the description carries the full burden and delivers very little. It does not say whether the mock persists across navigations, whether it overrides prior mocks for the same pattern, whether unmatched requests pass through, or what happens when urlPattern conflicts with an existing route.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

It is a single front-loaded sentence with no wasted words, which is good structurally. But the brevity comes at the cost of substance rather than being earned conciseness, given four parameters and no annotations.

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 behaviorally significant tool that installs a network interceptor, with no annotations, no output schema, and only 25% schema coverage, the description leaves the agent without enough to invoke it confidently or predict its side effects.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is only 25%: pageId is documented in the schema, but urlPattern, status, and body are not. The description says the response is JSON, hinting that body is the payload, but it never clarifies whether body is an object, a string, or a serialized JSON string, nor what urlPattern matching syntax (glob, regex, substring) is expected.

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

Purpose3/5

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

The verb 'Fulfill' plus 'JSON response' and 'matching requests' conveys that this stubs network traffic with a JSON payload, which is more specific than the title. However, it never says 'network request' or 'route interception' explicitly, so an agent must infer the mechanism, and nothing distinguishes it from the sibling network_block.

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 when-to-use statement, no precondition (e.g. must be called before navigation), and no mention of network_block as the alternative for blocking rather than fulfilling. The agent gets no routing guidance among the network-family siblings.

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