Skip to main content
Glama

generateMocksFromNetwork

Convert captured network requests and responses into TWD mock request handlers so you can replay real API data in deterministic browser tests.

Instructions

Generate TWD mock request handlers from captured network requests/responses.

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": {
      "requests": "<requests>"
    },
    "name": "generateMocksFromNetwork"
  }
}

Input Schema

NameRequiredDescriptionDefault
requestsYesArray of captured network requests

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

C2.9/5.0
Behavior2/5

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

No annotations are supplied, so the description carries the full behavioral burden and largely fails it. It doesn't say whether output is written to disk or returned, what the generated handlers look like, whether existing mocks are overwritten, or what 'TWD' refers to.

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?

A single front-loaded sentence with no filler or repetition. Its brevity is disciplined, though it is terse enough that useful detail was traded away.

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 generator tool with no annotations and no output schema, the description says nothing about the shape of the result, side effects, or error behavior. The nested input schema is well documented, but the output side and behavioral expectations are entirely missing.

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% with a single nested 'requests' parameter that the schema documents fully (url, method, response body/status). The description only echoes 'requests/responses' and adds no constraints or formatting detail beyond the schema, so baseline 3 applies.

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?

States a specific verb (Generate) and a specific artifact (TWD mock request handlers) plus the input source (captured network requests/responses). An agent can tell roughly what it produces, though sibling differentiation is only implicit from the differing inputs.

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?

No when-to-use, when-not-to-use, or alternative guidance is given. The phrase 'from captured network requests/responses' implies the input source but does not tell the agent when to pick this over generateTestFromRecording or suggestSelectors.

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