Skip to main content
Glama
vola-trebla

playwright-network-chaos-mcp

by vola-trebla

simulate_stateful_failure

Simulate transient failures by failing initial requests, then allow success, to test retry and recovery logic.

Instructions

Intercepts requests matching a URL pattern and fails the first N requests with an error status, then lets subsequent requests succeed. Simulates transient failures and tests retry/recovery logic. Use to answer: does the app retry after a 503 and recover when the service comes back?

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlYesURL of the page to test
wait_msNoMilliseconds to wait after navigation before checking state (default: 2000)
viewportNoViewport size (default: 1280×720)
http_statusNoHTTP error status code for the failing requests (default: 503)
failure_countNoNumber of requests to fail before allowing success (default: 3)
success_payloadNoResponse body for requests after the failure window (default: {"ok":true}){"ok":true}
fallback_selectorNoCSS selector for the fallback/retry UI that should appear (e.g., '.retry-button')
intercept_patternYesGlob pattern for requests to intercept (e.g., '**/api/data**')
Behavior4/5

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

With no annotations, the description carries full burden. It discloses the core stateful behavior (fails first N, then succeeds), the error status, and the success payload concept. It does not mention cleanup/reset or how the tool handles multiple navigations, but it provides substantive behavioral context beyond 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?

Two sentences that lead with the action and then state the use case. No redundant text; every sentence contributes.

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?

The description explains the main behavior and use case but lacks details about what the tool returns or how fallback_selector integrates into the test. Given no output schema, the agent would benefit from knowing the result format. The parameter semantics for nested viewport are left to the schema.

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 coverage is 100%, so the baseline is 3. The description implicitly explains failure_count and http_status ('fails the first N requests with an error status'), but does not add detail for wait_ms, viewport, or fallback_selector. It adds minimal value beyond the schema.

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 clearly states the tool intercepts requests, fails the first N with an error status, then allows success. This specific behavior distinguishes it from sibling tools like simulate_api_failure or inject_latency, which likely don't implement the stateful failure recovery pattern.

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 explicitly frames the tool for testing retry/recovery logic with the example 'does the app retry after a 503 and recover when the service comes back?' This gives clear context for use, though it doesn't explicitly name when not to use or compare to alternatives.

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/vola-trebla/playwright-network-chaos-mcp'

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