Skip to main content
Glama

sim_expect

Run ESP32 firmware in simulation and assert expected UART text or regex patterns to automate firmware unit and integration tests.

Instructions

Runs firmware in simulation and asserts that specific text or regex patterns appear on UART. Ideal for automated unit & integration testing in a Red-Green-Refactor agent loop.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
chipNoTarget chip family. Default is s3 (ESP32-S3).
wifiNoAttach a virtual access point with DHCP/DNS/NAT. Spec like 'ssid=demo,psk=secret' (keys: ssid, psk, chan, bssid), or a bare SSID for an open network. Station gets 10.0.2.15.
boardNoBoard model: S3 'atech14' (default), 'waveshare-lcd4b', 'waveshare-amoled18-v2', 'waveshare-cam'; C6 'waveshare-c6-lcd147'; ESP32 'ttgo-tdisplay', 'esp32dev-loopback'; 'none' for a bare module. Omit on the C3, which has no boards. See sim_list_boards.
appBinNoDirect path to the application binary (.bin).
eventsNoOptional interaction events before checking patterns.
orderedNoWhether patterns must appear in exact chronological sequence (default: true).
patternsYesList of expected strings or regex patterns on UART output.
ptableBinNoDirect path to partition-table.bin (needed with appBin for a real ROM boot).
maxSecondsNoMax emulated seconds to wait for patterns (default 10).
projectDirNoPath to the ESP-IDF project root or build folder. If omitted, uses current working directory.
bootloaderBinNoDirect path to bootloader.bin (needed with appBin for a real ROM boot).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.1

TDQS

A3.7/5.0
Behavior3/5

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

With no annotations, the description carries the full burden. It does disclose the core behavior (boots firmware in a simulator and matches patterns against UART output, with ordering semantics implied elsewhere), but it never says what happens on a mismatch — error, failing result payload, or timeout — nor explains side effects of launching a simulation, which is the key behavioral fact for an assertion tool.

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?

Two sentences, zero waste, and the primary purpose is front-loaded ahead of the testing use case. Nothing is repeated or padded.

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?

For an 11-parameter tool with no annotations and no output schema, the description leaves meaningful gaps: it never states the outcome contract (pass/fail semantics, behavior on unmet patterns or timeout), nor how it relates to sim_run/sim_script. The rich input schema compensates for parameter-level detail, but the assertion-result behavior remains undocumented.

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% across 11 parameters, including chip, board, events, maxSeconds and the bin paths, so the schema does the heavy lifting. The description only loosely reinforces semantics ('text or regex patterns on UART'), adding little beyond what the schema already documents. Baseline 3 is appropriate.

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?

States a specific verb+resource: it runs firmware in simulation and asserts that text/regex patterns appear on UART output. That is a precise purpose an agent can distinguish from a plain run tool, though the description never names a sibling (sim_run, sim_script) to sharpen the boundary.

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 usage context — automated unit and integration testing inside a Red-Green-Refactor agent loop — which tells the agent when this tool is appropriate. It stops short of explicit exclusions or naming the alternative (e.g. use sim_run when no assertion is needed).

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