Skip to main content
Glama
fieldpuppet

fieldpuppet

Official

Inject a communication fault

inject_fault
Idempotent

Simulate Modbus device communication faults—delays, timeouts, exception replies, or dropped connections—to test how client software handles failures until cleared.

Instructions

Make one device misbehave on the wire so you can test how client software copes: slow answers, no answer (timeout), Modbus exception replies, or dropped connections. The fault applies to every request the device receives, replaces any fault already active on it, and lasts until clear_fault is called or its optional duration_s runs out. Point values keep updating in the background. Use apply_scenario to schedule faults at set times.

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": {
      "device_id": "<device_id>",
      "fault": "<fault>"
    },
    "name": "inject_fault"
  }
}

Input Schema

NameRequiredDescriptionDefault
faultYesFault object. One of: {"type":"delay","ms":N} (slow answers) | {"type":"no_response"} (client times out) | {"type":"exception","code":N} (Modbus exception, e.g. 4 device failure, 6 busy) | {"type":"disconnect"} (drop the TCP connection on every request). Add "duration_s":N to clear it automatically.
device_idYesId of a running device, as returned by create_device, clone_device or list_devices.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.1.2
    • changedInput schema / properties / device_id / description
      Previous value: -"Device id as returned by create_device or list_devices."New value: +"Id of a running device, as returned by create_device, clone_device or list_devices."
  2. First observedv0.1.1

TDQS

A5/5.0
Behavior5/5

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

It goes far beyond annotations by detailing operational behavior: the fault applies to every request, it replaces existing faults, and it highlights that 'Point values keep updating in the background' during the fault injection.

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 highly efficient, front-loading the use case in the first sentence and structuring the operational details (persistence, timing, and side effects) logically thereafter.

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?

Given the complexity of fault injection, the description is extremely complete, covering persistence logic, fault application scope, and the behavior of related data points.

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?

While schema coverage is 100%, the description adds vital semantic meaning by translating complex input types into real-world behaviors like 'slow answers,' 'Modbus exception,' and 'dropped connections.'

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 defines the purpose specifically as making a device 'misbehave on the wire' to test software coping mechanisms, clearly separating it from general read/list operations. It provides specific fault types (slow answers, no response, etc.).

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

Usage Guidelines5/5

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

The guidance is explicit, stating that the fault applies to 'every request' and provides workflow instructions by directing the agent to use 'apply_scenario' for scheduling.

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