Skip to main content
Glama

Set fault rules

twin_set_faults
DestructiveIdempotent

Replaces active fault rules so vendor APIs fail like real ones. Inject HTTP errors, latency, or lost responses per vendor, method, and path, or simulate duplicate and delayed webhooks.

Instructions

Replace the active fault rules, so the vendor APIs fail the way real ones do. Each rule: { name, vendor: quickbooks|jobber|housecallpro, method?, pathIncludes?, pathExcludes?, rate: 0-1, effect: { status?: HTTP error status, latencyMs?, message?, lostResponse?: do the work, then answer with status } }. A rule with webhook: TOPIC or "*" (and no method, pathIncludes, or pathExcludes) affects webhook deliveries instead: effect { duplicate?: true, delayMs? }. An empty list turns faults off. Bad rules change nothing. Answers with the active rules' names.

Input Schema

NameRequiredDescriptionDefault
rulesYesEvery rule to keep active, shaped as above; [] turns faults off

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.5.3
    • addedInput schema / properties / rules / description
      Added value: +"Every rule to keep active, shaped as above; [] turns faults off"
  2. First observedv0.5.2

TDQS

A4.7/5.0
Behavior5/5

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

Goes well past the annotations: replacement semantics (not merge), the fact that an empty list disables faults, that invalid rules are rejected atomically without changing current state, and that the response lists the active rule names. These are exactly the mutation risks an agent needs to know before calling a destructiveHint tool.

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?

Front-loaded with the core action, and every sentence earns its place: replacement behavior, rule grammar, webhook variant, disabling, validation, and return value. It is a single dense run-on block, though, which makes the inline type notation slower to parse than necessary.

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?

One required parameter, no output schema, no annotations beyond hints, and a nested rule shape that lives only in prose. The description supplies all of it, including the return value, so an agent has everything needed to construct a valid call.

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

Parameters5/5

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

The JSON schema declares a single array of untyped items, so the description carries the entire rule grammar: field names, the `vendor` union, `rate` range, the `effect` object with status/latencyMs/message/lostResponse, and the alternate webhook rule shape. This is substantial meaning well beyond anything in 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?

States a specific verb and resource ("Replace the active fault rules") plus its purpose (make vendor APIs fail like the real ones), which immediately distinguishes it from sibling configuration tools like twin_set_auth and twin_set_webhooks. The webhook-overload case is explicitly carved out, so the agent can see this tool's full scope.

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?

Gives clear operational triggers: an empty list turns faults off, and webhook faults are expressed here via a `webhook` topic rather than through the hooks-related siblings. It never explicitly says when to prefer twin_set_webhooks or twin_set_auth instead, so the boundary with those siblings is inferred rather than stated.

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