Skip to main content
Glama

assert_chaos_handled

Injects a chaos HTTP status into matching requests and asserts whether the app shows fallback UI and survives without unhandled exceptions.

Instructions

Opens the browser, navigates to the application, and injects a chaos HTTP status into all matching requests. Checks: did the app show fallback UI, were there unhandled exceptions, and did it survive? Use to answer: is the app chaos-resilient — does it show a recovery UI without throwing exceptions?

Input Schema

NameRequiredDescriptionDefault
urlYesURL of the page to test
wait_msNoMilliseconds to wait after navigation before evaluating verdict (default: 2000)
headlessNoWhether to run in headless mode (default: false, launches real browser so user sees application)
viewportNoViewport size (default: 1280×720)
http_statusNoHTTP error status to return for all matching requests (default: 500)
preview_delay_msNoMilliseconds to pause after simulation before closing browser, allowing visual inspection (default: 2000)
intercept_patternYesGlob pattern for requests to fail (e.g., '**/api/**')
keep_browser_openNoKeep browser window open after test completes so user can interactively inspect the app (default: false)
api_health_check_urlNoOptional backend or hosted API health check URL to verify before running chaos test. Aborts if backend is down or errors.
expected_fallback_selectorNoCSS selector for the fallback/error UI expected to appear (e.g., '.error-boundary'). chaos_survived is true only when this is found AND there are no unhandled exceptions.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.2

TDQS

A3.7/5.0
Behavior3/5

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

With no annotations, the description carries the full burden, and it does disclose useful behavior — a real browser is opened, requests are intercepted, and the verdict requires both a fallback selector and zero unhandled exceptions. But it omits important operational traits: roughly how long a run takes (navigation + wait_ms + preview_delay), that the browser closes at the end unless keep_browser_open is set, and what the result object contains, despite there being no output schema to fall back on.

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, front-loaded with the action and then the assertion question the tool answers. Nothing is padded and every clause carries information.

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?

For a 10-parameter tool with a nested viewport object, no annotations, and no output schema, the description covers the action and the success criterion but never describes the return shape (chaos_survived is mentioned only inside the schema) or the failure/abort modes already hinted at by api_health_check_url. It is adequate but leaves real gaps for an agent interpreting results.

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% across all 10 parameters, including the crucial expected_fallback_selector semantics, so the baseline is 3. The description adds no parameter meaning beyond the schema — it does not, for example, explain how http_status and intercept_pattern interact or what happens when the pattern matches nothing.

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?

The description names specific verbs and a resource: it opens a browser, navigates, and injects a chaos HTTP status into matching requests, then asserts a verdict on fallback UI and exceptions. That is far more specific than its siblings' names imply. It never differentiates itself from simulate_api_failure, which sounds like the closest alternative, so it does not reach a 5.

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?

"Use to answer: is the app chaos-resilient — does it show a recovery UI without throwing exceptions?" gives a clear decision context for reaching for this tool. However, it never says when not to use it or names any sibling (e.g., simulate_api_failure for a plain injection without assertion), so no exclusions are stated.

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