Skip to main content
Glama
fieldpuppet

fieldpuppet

Official

Play a scenario on a device

apply_scenario

Play a timed timeline of steps on one simulated Modbus device: set points, drive signals, inject or clear faults at given seconds. Use it to rehearse sequences like a pump trip and recovery.

Instructions

Play a timeline of timed steps on one device, starting now: set values, start or stop signals, inject or clear faults at given seconds. Use it to rehearse a sequence such as a pump trip followed by recovery; use set_point, set_signal or inject_fault for a single immediate change. Replaces any scenario already running on that device. Values, signals and faults set by steps stay in place after the scenario ends. Returns the scenario state.

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>",
      "scenario": "<scenario>"
    },
    "name": "apply_scenario"
  }
}

Input Schema

NameRequiredDescriptionDefault
scenarioYesTimeline of steps for one device.
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. Changed8 schema fields 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."
    • addedInput schema / properties / scenario / properties / name / description
      Added value: +"Label shown in list_devices and on the dashboard. Optional."
    • changedInput schema / properties / scenario / properties / repeat / description
      Previous value: -"Start over after the last step."New value: +"Start over after the last step. Default false."
    • addedInput schema / properties / scenario / properties / steps / description
      Added value: +"Steps in any order; each runs once when its time is reached."
    • addedInput schema / properties / scenario / properties / steps / items / properties / action / description
      Added value: +"What the step does. set_point needs point and value; set_signal needs point and signal; clear_signal needs point; fault needs fault; clear_fault needs nothing else."
    • addedInput schema / properties / scenario / properties / steps / items / properties / at_s / description
      Added value: +"Seconds after the scenario starts at which this step runs."
    • addedInput schema / properties / scenario / properties / steps / items / properties / point / description
      Added value: +"Point name, for set_point, set_signal and clear_signal."
    • addedInput schema / properties / scenario / properties / steps / items / properties / value / description
      Added value: +"Engineering value, for set_point."
  2. First observedv0.1.1

TDQS

A4.7/5.0
Behavior5/5

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

Beyond the annotations it discloses three behaviors an agent cannot infer: the scenario starts immediately ('starting now'), it replaces any scenario already running on that device, and values/signals/faults set by steps persist after the scenario ends. It also states what is returned ('the scenario state'), which matters since there is no output schema. The replacement behavior sits in slight tension with destructiveHint=false, but it is a scenario-config replacement rather than data destruction, so this is disclosure rather than contradiction.

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?

Four sentences, front-loaded with purpose, then use case plus alternatives, then the two non-obvious behavioral facts, then the return value. No sentence is redundant and nothing is buried.

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?

For a tool with nested step objects and no output schema, the description covers what it does, when to use it versus siblings, its side effects on existing scenarios, persistence after completion, and the return value. Nothing an agent needs in order to call it correctly is missing.

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%, and the description's parameter content ('at given seconds', the list of actions) largely restates what the schema already documents in detail, including the step action enum and fault/signal shapes. It adds the sequencing note that steps run once when their time is reached only implicitly; baseline 3 is appropriate when the schema carries the semantics.

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 opens with a specific verb and resource: 'Play a timeline of timed steps on one device,' and immediately enumerates the effect classes (values, signals, faults) with timing ('at given seconds'). It also distinguishes itself from the single-change siblings (set_point, set_signal, inject_fault), so an agent can pick the right tool without opening either schema.

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?

It names the exact scenario it is for ('rehearse a sequence such as a pump trip followed by recovery') and explicitly routes single immediate changes to set_point, set_signal or inject_fault. That is an explicit use-case plus named alternatives, which is the top of the scale.

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