Skip to main content
Glama

Interactively drive a state machine

riv_play_state_machine

Run a .riv state machine step by step to set or fire inputs, advance time, observe state transitions, and optionally capture frames, returning a transition report.

Instructions

Run a .riv state machine step by step: set/fire inputs, advance time, observe state transitions, and optionally capture frames. Returns a transition report.

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": {
      "path": "<path>",
      "steps": "<steps>"
    },
    "name": "riv_play_state_machine"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathYesPath to the .riv file
stepsYesSequence of interaction steps
widthNoOutput width in px (default 480)
artboardNoArtboard name (default: first artboard)
backgroundNoCSS background color (default: transparent)
stateMachineNoState machine name (default: first)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changedv0.8.0
    • addedInput schema / properties / artboard / description
      Added value: +"Artboard name (default: first artboard)"
    • addedInput schema / properties / background / description
      Added value: +"CSS background color (default: transparent)"
    • addedInput schema / properties / width / description
      Added value: +"Output width in px (default 480)"
  2. First observedv0.5.0

TDQS

B3.3/5.0
Behavior2/5

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

With no annotations, the description carries the full behavioral burden. It discloses the execution flow and that a transition report is returned, plus optional frame capture, but it does not clarify side effects, whether the .riv file is modified, permission requirements, output format, or constraints such as step limits.

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 a single front-loaded sentence that lists the key actions and return value without waste. Every clause contributes to understanding the tool's operation.

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?

The description covers the core workflow and return value at a high level. Given the tool's complexity (six parameters, nested steps, no output schema, and no annotations), it leaves gaps around step execution semantics, output structure, and behavioral constraints, but is minimally adequate for an agent to attempt invocation.

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%, so the input schema already documents all six parameters and the nested step fields. The description adds a high-level mapping of inputs, advancement, and capture to the step workflow, but no syntax or constraints beyond what the schema provides.

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 states a specific verb and resource: it runs a .riv state machine step by step, with set/fire inputs, time advancement, transition observation, and optional frame capture. It is clear what the tool does, but it does not explicitly distinguish itself from render-oriented siblings such as riv_render_frame or riv_render_gif.

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

Usage Guidelines3/5

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

Usage is implied by the step-by-step interaction model and the optional frame capture, which suggests it is for scripted state-machine playback rather than static rendering. However, it gives no explicit when-to-use, when-not-to-use, or named alternatives among the many sibling tools.

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