Skip to main content
Glama

Stub network routes for deterministic captures

mock_route

Stub URL patterns with canned responses to prevent flaky or third-party endpoints from affecting your tests. Add, clear, or list stubs that survive navigation and crashes.

Instructions

Stub matching requests with canned responses, so flaky or third-party endpoints cannot change what you capture. add registers a URL glob → {status, contentType, body, headers}; clear removes stubs by pattern or all; list shows the active ones. Stubs are context-level: they survive navigations and a crash until cleared. Only sub-resources can be mocked, never the top-level navigation.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
bodyNoResponse body for the stub (e.g. a JSON string). Omit for empty.
actionYesadd = stub a URL pattern with a canned response; clear = remove stubs (by pattern, or all when pattern omitted); list = show active stubs.
statusNoHTTP status for the stubbed response (default 200).
headersNoExtra response headers for the stub.
patternNoURL glob to intercept (e.g. **/api/**). Required for add, an optional filter for clear. Only sub-resources can be mocked — the top-level navigation still hits the real server.
contentTypeNoContent-Type for the stubbed response (default application/json).application/json

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.29.0

TDQS

A4.7/5.0
Behavior5/5

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

With no annotations, the description carries full disclosure burden and meets it: stubs are context-level, survive navigations and crashes until cleared, and only apply to sub-resources. It also clarifies action semantics (add/clear/list) and persistence, which are not visible in the schema.

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?

Four sentences, each earning its place: purpose, action breakdown, persistence model, and scope limitation. It is front-loaded with the most important information and contains no filler or schema repetition.

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

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a six-parameter, multi-action tool, the description covers action behavior, request scoping, persistence, and the top-level navigation restriction. Since every parameter is already documented in the schema, an agent has everything needed to invoke the tool correctly.

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

Parameters4/5

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

Schema description coverage is 100%, so the baseline is met. The description adds value by mapping add to a URL glob → {status, contentType, body, headers} shape and explaining how clear/list use pattern, going slightly beyond individual parameter descriptions.

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 object ('Stub matching requests with canned responses') and immediately states the operational purpose: deterministic captures despite flaky or third-party endpoints. It enumerates the three actions (add/clear/list), making the tool's scope unmistakable and distinct from the capture/audit/screenshot siblings.

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?

It gives a clear trigger condition—use stubs when flaky or third-party endpoints could change captures—and an explicit when-not: top-level navigation can never be mocked. It does not name an alternative sibling tool, but none of the listed siblings offers mocking, so the context is sufficient without maximal 'vs alternatives' guidance.

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