Skip to main content
Glama
vola-trebla

playwright-network-chaos-mcp

by vola-trebla

simulate_api_failure

Intercept API requests to return error codes and verify fallback UI appears. Test resilience by simulating service failures.

Instructions

Intercepts API requests matching a URL pattern and makes them return an error status code. Navigates to the page and checks if a fallback UI element appears. Use to answer: does the app show a proper error state when the payment API returns 503?

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlYesURL of the page to test
wait_msNoMilliseconds to wait after navigation before checking the fallback (default: 2000)
viewportNoViewport size (default: 1280×720)
status_codeNoHTTP error status code to return (default: 503)
response_bodyNoResponse body to return for intercepted requests{"error":"Service Unavailable"}
fallback_selectorNoCSS selector for the fallback UI that should appear (e.g., '.error-boundary')
intercept_patternYesGlob pattern for requests to intercept (e.g., '**/api/payment**')
Behavior3/5

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

With no annotations, the description carries the disclosure burden. It explains the core behavior (intercept, return error, navigate, check fallback) but does not disclose potential side effects (e.g., whether the interception persists, whether the browser session is cleaned up, or if the tool is safe for production use). This is basic but not exhaustive transparency.

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?

The description is two sentences, front-loaded with the main action, and free of filler. Every sentence earns its place: the first defines the mechanism, the second defines the verification step and a concrete use case.

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 tool is complex (7 params, no output schema) and the description does not explain what the tool returns or how to interpret the result (e.g., whether it returns a boolean or a report). The parameter schema is rich, and the description covers the high-level flow, but the missing return-value information leaves a gap in completeness.

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 the example 'payment API returns 503' which clarifies the intended values for status_code and intercept_pattern, but it does not elaborate on parameter semantics beyond what the schema already provides. No extra value to justify a higher score.

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 a specific action ('Intercepts API requests matching a URL pattern and makes them return an error status code') followed by the testing flow ('Navigates to the page and checks if a fallback UI element appears'). It distinguishes itself from siblings like inject_latency or block_resources by focusing on fault injection plus UI verification.

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?

The description gives a clear use case: 'Use to answer: does the app show a proper error state when the payment API returns 503?' This implies when the tool should be used. However, it does not explicitly mention when not to use it or name alternative tools, so it falls short of a 5.

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