Skip to main content
Glama

fault.replace_response

Return synthetic HTTP responses for matching browser requests to simulate errors or custom statuses, headers, and bodies.

Instructions

Return a synthetic response for matching requests, e.g. a 500 with an error body.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "url": "<url>"
    },
    "name": "fault.replace_response"
  }
}

Input Schema

NameRequiredDescriptionDefault
urlYes
bodyNo
countNo
statusNo
headersNo
target_idNoTarget handle (tgt_*). Omit for the active page.
browser_idNoBrowser handle (br_*). Omit to use the only running browser, or auto-launch one.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

C2.9/5.0
Behavior3/5

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

Annotations only declare readOnlyHint=false and openWorldHint=true, so the description is doing real work by disclosing that requests are intercepted and answered with a synthetic response (status and body, per the example). However, it omits important behavioral facts: whether the rule persists until fault.remove/fault.clear, how many requests are affected (the count parameter), and what happens when multiple fault rules overlap.

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?

A single front-loaded sentence with no filler or redundancy. The terseness is appropriate, though the brevity tips into under-specification rather than disciplined economy.

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

Completeness2/5

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

This is a stateful fault-injection tool with 7 parameters, low schema coverage, and no output schema, yet the description is a lone sentence. An agent lacks the lifecycle information (persistence, clearing, override semantics) and parameter meaning needed to install a fault correctly.

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

Parameters2/5

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

Schema description coverage is only 29% — just target_id and browser_id are documented — so the description carries the burden for url, body, count, status, and headers. It only gestures at status and body via 'a 500 with an error body', and says nothing about count, headers, or how url matching works, leaving most parameters unexplained.

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 uses a specific verb ('Return a synthetic response') tied to a clear effect and scopes it to 'matching requests', so an agent can tell this is a fault-injection stub rather than a proxy or a delay. It does not explicitly contrast itself with siblings like fault.abort, fault.delay, or fault.modify_headers, leaving the distinction to be inferred from the name.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

There is no when-to-use guidance, no statement of when this is preferable to aborting or delaying a request, and no mention of prerequisites such as an active page/browser or a prior fault rule. The phrase 'for matching requests' hints at interception but never explains what 'matching' means (the required url parameter).

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

Deploy Server

Other Tools