Skip to main content
Glama

Mock network responses

network_mock

Override API responses to test hard-to-reproduce states by matching requests with URL regex, then modifying status, headers, body, or latency.

Instructions

Override API responses to test hard-to-reproduce states (Android). Each rule matches requests by URL regex (+ optional method) and can override the status/headers, replace the body, regex-rewrite the live body (change one field, keep the rest), or inject latency. First match wins; rules hot-reload; capture keeps logging (mocked exchanges flagged). Android (Frida/OkHttp): call network_start with app_id first — mocking rides the capture hook (abort not yet supported). iOS response mocking is in development (network_start still captures). replace:true (default) replaces all rules; an empty list clears mocking.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
rulesNoMock rules; first match wins. Empty list with replace=true clears all mocks.
replaceNoReplace all rules (true) or append to existing (false)
device_idYesDevice id from list_devices (adb serial like 'emulator-5554', or an iOS simulator UDID)
Behavior5/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 richly: it discloses first-match-wins, hot-reload, capture logging continuation, flagged mocked exchanges, Android's missing abort support, iOS development status, and the replace:true default with empty-list clearing behavior.

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 dense but well-structured: purpose, capabilities, behavior, platform notes, and defaults are sequentially presented. It is slightly longer than ideal but every sentence provides value, and the most important information is front-loaded.

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?

Given the tool's complexity (nested rules array, multiple capabilities), the description is highly complete. It covers prerequisites, platform differences, rule matching semantics, hot-reload, logging behavior, and the replace default. No output schema exists, but for a mutation tool, the behavior-level detail is comprehensive.

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%, so the baseline is 3. The description adds semantic context like how rules work and replace behavior, but it doesn't elaborate on individual parameters beyond what the schema already states. The extra context is more about tool behavior than parameter meaning.

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+resource: 'Override API responses to test hard-to-reproduce states (Android).' It enumerates distinct capabilities (override status/headers, replace body, regex-rewrite, inject latency) and clearly differentiates itself from sibling network tools by explaining its mocking role and its dependency on network_start.

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 provides a clear use case ('test hard-to-reproduce states'), prerequisite guidance ('call network_start with app_id first' on Android), and notes platform limitations (iOS in development). However, it doesn't explicitly contrast with network_clear or network_requests, though the different functionality is implied.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/ryanperkins/Manos-MCP'

If you have feedback or need assistance with the MCP directory API, please join our Discord server