wave-mcp

v1.1.1
wave-mcp Checked 2 hours ago Published 1 month ago

Open-source, license-free MCP server for RTL waveform debug (FST + SystemVerilog static analysis), an Indago/Verisium Debug MCP alternative.

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

open_session

Open a debug session from a session directory or session.json manifest. Opens the FST waveform and the RTL netlist maps (if built). Does NOT consume any license and supports unlimited concurrent sessions. Without ``session_id`` this creates a *new* session: a fresh opaque id with its own query defaults. Opening the same design twice therefore gives two independent sessions, which is what lets two agents (or two conversations) work on one design without inheriting each other's window; the expensive part (parsed waveform, elaborated netlist) is shared, so the second…

ParameterTypeDescription
session_path *string
session_id

close_session

Close a session and release its reference to the loaded data. The data itself stays loaded while any other session still uses it, so closing one session never disturbs another. An unknown, somebody else's or already-closed session all report ``no-such-session``, which keeps the reply from confirming whether an id exists.

ParameterTypeDescription
session_id

session_info

Summarise the active session, or list the sessions this caller has open. With ``list_sessions=True`` it returns every session of the calling owner (id, manifest path, mode, resource id, when it was opened and last used) and refuses a ``session_id`` in the same call: it is a listing, not a lookup. Use it to find a session again after losing an id; it never shows another owner's sessions. Without it, returns a summary of the named session (or of the only one open): top, time range, counts, warnings and the current query defaults.

ParameterTypeDescription
list_sessionsboolean
session_id

query_defaults_set

Set the default signals and/or time window for the queries that follow. Once set, query tools may omit ``paths`` / ``start`` / ``end`` and will use these values, replying with ``_defaults_used: true`` so the data's range is never ambiguous. An explicit argument always overrides a default. Only the fields you pass are changed, so the window can be moved without restating the signals. Pass an empty list or an empty string to drop one field; use ``query_defaults_clear`` to drop everything. The whole update is validated before it is stored, so a rejected call changes…

ParameterTypeDescription
defaults_revision
end
paths
session_id
start

query_defaults_get

Return the current query defaults (default signals and time window).

ParameterTypeDescription
session_id

query_defaults_clear

Clear the query defaults; later calls fall back to the built-in defaults. Args: defaults_revision: refuse the update unless the stored defaults are still at this revision (see ``query_defaults_set``).

ParameterTypeDescription
defaults_revision
session_id

prepare_session

One-shot waveform analysis entry point — the standard team workflow. Takes a waveform file your simulator already produced and leaves an OPEN session ready to query: waveform (.fst read directly / .fsdb or .vcd auto-converted) -> build session.json -> open session. This never runs a simulator. Run your sim (xrun / Verilator / etc.) with your own flow first, then point this at the resulting ``.fst``, ``.fsdb`` or ``.vcd``. A converted FST is kept beside its source as ``<name>.fst`` (FSDB adds ``<name>.fst.hier``), and one already there, whether conve…

ParameterTypeDescription
wave_path *string
defines
filelist
filelist_path
incdirs
out_dir
pack
scopes
session_id
signals_file
timeout
topstring

open_static_session

Open a pure static-analysis session from RTL sources — NO waveform needed. Builds the RTL netlist (pyslang elaboration) and opens the session in one call, so you can explore a design before any simulation exists: connectivity, drivers, loads, fan-in, hierarchy, module/file/declaration queries all work from source code alone. Use this to understand design structure, review driver/fan-in relations, or check interfaces before running a sim. Waveform tools (signal_values*, trace_value, trace_x, active_drivers) return a clear "needs waveform" hint; later, call pr…

ParameterTypeDescription
defines
filelist
filelist_path
incdirs
out_dir
session_id
topstring

convert_vcd_to_fst

Convert an xrun-produced VCD to FST (fast). xrun's open/parseable dump is VCD; FST is ~1/50 the size and supports fast random access, which is what this server reads. Uses GTKWave ``vcd2fst`` with the fastest options. Args: vcd_path: input .vcd path. out_path: output .fst path. Default: ``<name>.fst`` beside the VCD, the same file ``prepare_session`` and ``open_wave_view`` reuse (overwritten if present); the wave-mcp cache when the VCD's directory is not writable, reported in ``notice``. pack: FST compressor: "fastlz…

ParameterTypeDescription
vcd_path *string
out_path
packstring
timeout

convert_fsdb_to_fst

Convert a Synopsys FSDB to FST via the bundled fsdb2fst (single pass). ``prepare_session`` already converts ``.fsdb`` automatically, so reach for this tool when you want to inspect or control the conversion first: check the scale and signal census of a huge file (``info_only=True``), or convert one subtree at a time. No VCD intermediate; requires Verdi's FsdbReader runtime on this machine (checks out no license). See docs/FSDB_GUIDE.md. Args: fsdb_path: input .fsdb path. out_path: output .fst path. Default: ``<name>.fst`` beside the FSDB, t…

ParameterTypeDescription
fsdb_path *string
info_onlyboolean
out_path
packstring
scopes
signals_file
timeout

find_instances

Locate instances, either by module definition or by position in the tree. Two ways in, same instance tree: - ``module`` -> every instantiation path of that module definition, optionally narrowed by ``name_contains`` (a substring of the instance's own leaf name). - ``under`` -> the instances below that scope; ``under=""`` starts at the top of the design. ``max_depth`` controls the depth. At least one of ``module`` / ``under`` / ``name_contains`` must be given, so a bare call cannot accidentally du…

ParameterTypeDescription
defaults_revision
filter_noiseboolean
limitinteger
max_depthinteger
module
name_contains
session_id
under

list_modules

Get all module definition names in the design (optionally filtered).

ParameterTypeDescription
defaults_revision
name_contains
session_id

scope_info

Get module info for a scope: module type, declaration & instantiation code. Module type comes from the FST; declaration location is resolved (best-effort) from the RTL source via Verible-tier scanning.

ParameterTypeDescription
path *string
defaults_revision
session_id

list_signals

Get the signals of an instance (ports + internal), with width/dir/type. ``name_contains`` keeps signals whose name contains the substring; ``signal_type`` accepts Port/Input/Output/Inout/Internal-wire/ Internal-register/Parameter (case-insensitive). ``limit`` caps the rows. ``aggregate_buses`` (default True) merges per-element/per-bit VARs a writer split apart (``bus [31] ... bus [0]``) into one ``bus[hi:lo]`` entry with an ``element_count`` field; per-element signals stay individually queryable by full path. Results are ordered ports -> registers -> wires -> para…

ParameterTypeDescription
path *string
aggregate_busesboolean
defaults_revision
limitinteger
name_contains
session_id
signal_type
underscore_styleboolean

signal_info

Get signal metadata: width, type, direction, and declaration file/line. Width/type/direction come from the FST; declaration file+line is resolved (best-effort) from the RTL source. ``path`` may be omitted when the defaults hold exactly one signal.

ParameterTypeDescription
defaults_revision
path
session_id

signal_values

Read signal values: a whole dump, a time window, or one instant. One tool for all three shapes, because they are the same query with the window degenerating. Several paths are read in a single pass over the file, so batching is cheaper than looping. - pass ``time`` -> the value each signal holds at that instant - pass ``start`` / ``end`` -> every change inside that window - pass neither -> every change in the whole dump Omitted arguments fall back to the session query defaults (see ``query_defaults_set``), and the reply carries ``…

ParameterTypeDescription
defaults_revision
end
limit
paths
session_id
start
time

signal_activity

Per-signal activity summary over a time window, in one pass over the file. Omitted arguments fall back to the session query defaults (see ``query_defaults_set``); the reply carries ``_defaults_used: true`` when any did. Answers "which of these signals actually moved here, and did any spend time unknown" without pulling raw value timelines first. One row per requested path, in request order: toggles value changes inside the window x_ratio share of the window the signal *held* an x value z_ratio same for z (both are time weighted, not…

ParameterTypeDescription
defaults_revision
end
paths
session_id
start

find_time_windows

Find the time intervals where a boolean condition over signals holds. Returns intervals, not values, so "when was req high while cnt stayed above 1" is one call instead of a value dump plus local post-processing. An omitted ``start`` / ``end`` falls back to the session query defaults (see ``query_defaults_set``); the reply carries ``_defaults_used: true`` when it did. The predicate is an expression object. Leaves: {"k":"sig","name":"top.u.req"} signal value (paths from list_signals) {"k":"const","lit":"8'd3"} SystemVerilog integer literal…

ParameterTypeDescription
predicate *object
defaults_revision
end
min_duration
session_id
start

signal_connectivity

Get signals directly wire-connected to the given signal (needs UHDM). ``path`` may be omitted when the defaults hold exactly one signal.

ParameterTypeDescription
defaults_revision
path
session_id

signal_drivers

Get all code locations that can drive the given signal (static; needs UHDM). ``path`` may be omitted when the defaults hold exactly one signal.

ParameterTypeDescription
defaults_revision
path
session_id

signal_loads

Get all signals affected by the given signal (fan-out; needs UHDM). ``path`` may be omitted when the defaults hold exactly one signal.

ParameterTypeDescription
defaults_revision
path
session_id

signal_fanin

Get all signals that can affect the given signal (fan-in; needs UHDM). Boundary nets (struct ports such as ``reg2hw``, aggregated buses, sub-module outputs) resolve to the peer ports one hop away; ``max_depth=1`` returns every direct peer, a larger value the cone behind each, following boundary hops up to that many levels. For source locations rather than signal names use signal_drivers. ``path`` may be omitted when the defaults hold exactly one signal. Args: max_depth: hierarchy levels to follow (1 = direct fan-in only, the default; up to 8 f…

ParameterTypeDescription
defaults_revision
limitinteger
max_depthinteger
path
session_id

active_drivers

Get the active driver(s) of a signal at a time point (dynamic; needs UHDM+FST). ``path`` may be omitted when the defaults hold exactly one signal, and ``time`` falls back to the query defaults's window start. A malformed time string is answered with a structured invalid_argument error instead of raising.

ParameterTypeDescription
defaults_revision
path
session_id
time

driver_contributors

Get the contributing signals (RHS / control) of a driver (needs UHDM).

ParameterTypeDescription
driver_unique_id *string
defaults_revision
session_id

trace_value

Trace how a signal's value at a time point was produced (needs UHDM+FST). ``path`` may be omitted when the defaults hold exactly one signal, and ``time`` falls back to the query defaults's window start. A malformed time string is answered with a structured invalid_argument error instead of raising. Args: max_depth: maximum recursion depth for the trace tree (default 12, range 1-50). Increase for deep designs; decrease for faster, shallower traces.

ParameterTypeDescription
defaults_revision
max_depthinteger
path
session_id
time

trace_x

Trace the root cause of an X value on a signal (approximate; needs UHDM+FST). ``path`` may be omitted when the defaults hold exactly one signal, and ``time`` falls back to the query defaults's window start. A malformed time string is answered with a structured invalid_argument error instead of raising. Args: max_depth: maximum recursion depth for the X-trace tree (default 12, range 1-50).

ParameterTypeDescription
defaults_revision
max_depthinteger
path
session_id
time

files

List the design's source files, find one by name, or read a file's modules. Three shapes of the same file index: - no arguments -> every source file participating in the design - ``name`` -> full paths whose short name matches (substring, or exact with ``exact=True``) - ``modules_of`` -> the module definitions declared in that file Note ``modules_of`` takes a *filesystem* path, not a design hierarchy path. Args: name: (partial) file short name, e.g. "uart_core.sv". exact: require the short name to m…

ParameterTypeDescription
defaults_revision
exactboolean
modules_of
name
session_id

sample_at_clock

Values of signals sampled on a clock's edges: one row per clock cycle. A waveform stores changes, but synchronous logic is reasoned about per cycle. Reading raw changes makes every combinational glitch and every picosecond of skew look like an event; sampling on the edge asks what the logic actually captured. Returns a cycle table: each row is one edge time plus the value each requested signal held at that instant. ``null`` means the signal had no recorded value yet, which is not the same as x and is not collapsed into it. Only clean 0->1 (or 1->0) clock tran…

ParameterTypeDescription
clockstring
defaults_revision
edgestring
end
limit
paths
session_id
start

fsm_transitions

State transitions a register actually made, plus which RTL branches ran. Two facts a waveform can settle about a state machine: which transitions occurred (with counts and first occurrence), and which of the RTL branches assigning this register ever had its guard hold at a transition instant. **This is not coverage.** Coverage needs a denominator — the states and transitions the design is *supposed* to have — and that comes from intent, not from one dump. A state or transition not listed may be unreachable by design, simply not exercised by this stimulus, or a…

ParameterTypeDescription
defaults_revision
end
path
session_id
start

signal_downstream

Signals this one can affect, optionally with when each next changed. The forward mirror of ``signal_fanin``. ``signal_loads`` gives one hop; this follows the chain, including across hierarchy boundaries. Pass ``time`` to join the netlist answer with the waveform: each downstream signal also reports the first time it changed *after* that instant. That turns "what does this reach" into "what actually moved as a result", which is the question worth asking when a signal went wrong at a known moment. Reachability comes from the netlist and a change after ``time`` is o…

ParameterTypeDescription
defaults_revision
limitinteger
max_depthinteger
path
session_id
time

fold_transactions

Fold signal activity into transaction records you define. A bus trace is thousands of value changes; the question is usually "which transactions happened and what did each carry". You say what a transaction is, this returns the records. **No protocol library is built in** — no AXI, APB or AHB tables. Describe the handshake yourself with the same expression objects ``find_time_windows`` uses. A built-in protocol table would be wrong for every design that deviates from the spec, and wrong silently. Conditions are treated as *edges*: a transaction opens when `…

ParameterTypeDescription
end_cond *object
start_cond *object
defaults_revision
end
fields
id_field
limit
session_id
start

diff_waveforms

Compare two or more FST waveforms and find the first divergence. Turns "what changed between these runs" into one deterministic call: returns the first divergence time, the earliest-diverging signals (prime suspects; later ones are usually downstream contagion) and an honest coverage flag. Follow up with signal_fanin/active_drivers on the earliest diverger, then open_wave_view with the runs and a marker there. With more than two runs each diverging signal also reports ``groups``: the run indices partitioned by the value they hold. How the runs split is itself…

ParameterTypeDescription
fst_paths *array
after
clock
scope
signals

open_wave_view

Open waveform(s) in the browser viewer and return the URL for the user. Streams via a local surver process, so tens-of-GB FSTs open in milliseconds. Give the returned URL to the user; IDE terminals auto-forward localhost ports. Two fst_paths open a comparison view. Time fields are strict objects: {"time": <digits>, "unit": "ps"} (unit one of s / ms / us / ns / ps / fs, default ps). A suffixed value like "1523400ps" is accepted and normalized. Unknown fields, unknown units, conflicting suffixes and malformed values are rejected with a structured error naming th…

ParameterTypeDescription
fst_paths *array
annotation
cursor
diff
labels
markers
signals
viewport

update_wave_view

Update an open wave view in place (same URL, no reload for the user). Omitted args keep their current value; lists replace entirely except annotations, which append to the analysis log popup. Same ``group``, ``annotation`` and time-schema conventions as open_wave_view; returns ``warnings`` for a dropped command or a requested signal that is not in the waveform, and structured errors on bad input.

ParameterTypeDescription
view_id *string
annotation
cursor
markers
signals
viewport

get_view_state

Read the delivery status of an open wave view. Returns the actual state (applied revision, page_ready / page_error) written back by the browser, plus a desired-state summary. ``page_ready`` says whether the page actually reached the streaming backend (a blank or unreachable page reports false with the reason in ``page_error``). User-interaction readback (cursor position, user_dirty) is not populated: the shell no longer reads state out of the viewer app, so those fields stay at their defaults.

ParameterTypeDescription
view_id *string

list_wave_views

List the wave views currently open in this server. Returns each view's view_id, url, title, waveform paths, revision and whether its streaming backend is still alive, newest first. Use it to find a view again after losing track of a view_id, or to check what is still holding resources during a long batch run.

close_wave_view

Close a wave view and release its server and streaming backend. Views stay open until closed, so a batch that opens many of them should close each one when done. The streaming backend is shared between views on the same waveform set and is only stopped once no view still uses it. Args: view_id: the view to close. Required unless all_views is set. all_views: close every open view instead of a single one.

ParameterTypeDescription
all_viewsboolean
view_id