Skip to main content
Glama

run_scenario

Execute millisecond-timed multi-step CAN scripts in one call to automate sequenced open, send, wait, and close flows, returning JSON per-step timing and cleaning up scenario-owned periodic tasks.

Instructions

Run a millisecond-timed multi-step CAN script in one call.

    Prefer this for sequenced open→send→wait→close flows; use the single-shot
    tools (send_frame, monitor, …) for one operation. periodic_start steps must
    include duration_s (max 300). On finish, scenario-owned periodic tasks are
    cleaned up. Returns JSON Result with per-step timing; invalid JSON yields
    INVALID_ARGUMENT.
    

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": {
      "steps_json": "<steps_json>"
    },
    "name": "run_scenario"
  }
}

Input Schema

NameRequiredDescriptionDefault
steps_jsonYesJSON string: a steps array, or an object with steps plus optional vars. Actions include open/send/wait_id/wait_n/drain/filter/accept_all/sleep/repeat/try/burst_send/periodic_start/periodic_stop/close.

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.1.4
    • addedInput schema / properties / steps_json / description
      Added value: +"JSON string: a steps array, or an object with steps plus optional vars. Actions include open/send/wait_id/wait_n/drain/filter/accept_all/sleep/repeat/try/burst_send/periodic_start/periodic_stop/close."
  2. First observedv0.1.3

TDQS

A4.5/5.0
Behavior4/5

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

Annotations declare it is not read-only and acts on an open world, and the description adds non-obvious behavior: scenario-owned periodic tasks are cleaned up on finish, and malformed JSON yields INVALID_ARGUMENT. It does not clarify whether an existing device session is required or what happens if a mid-script step fails (partial execution vs rollback), which keeps it below a 5.

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?

Five short sentences, front-loaded with the primary use case before routing advice, then constraints and return behavior. No filler, though the ordering could be marginally tighter by grouping the constraint and cleanup notes together.

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

Completeness4/5

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

For a single complex string-encoded script parameter with an output schema present, the description covers routing, action constraints, cleanup semantics, and error signaling. Failure modes within a partially executed script are the only meaningful gap, and the output schema covers return shape.

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

Parameters4/5

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

Schema coverage is 100% and the schema already enumerates the action vocabulary, so the baseline is 3. The description goes beyond it by imposing a per-action constraint — periodic_start steps must include duration_s with a maximum of 300 — which is semantic guidance not present 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 — 'Run a millisecond-timed multi-step CAN script in one call' — and immediately distinguishes it from the single-shot siblings (send_frame, monitor) by scope. The agent knows exactly what class of operation this is without opening the 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?

Gives explicit routing guidance: prefer this for sequenced open→send→wait→close flows, and use single-shot tools for one operation. It also states a hard precondition for the periodic_start action (duration_s required, max 300), which is the kind of when-to-use constraint that prevents failed calls.

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