plot_waveform
Create an interactive HTML chart for any LTspice signal from a transient, DC, AC, or noise simulation, so you can visually zoom, pan, and inspect waveforms instead of reading raw numeric data.
Instructions
Render an INTERACTIVE chart of one or more signals FOR A HUMAN to look at (zoom/pan/hover) — the co-design complement to the numeric tools. It returns NO data values to the model; it produces a picture.
Picks the chart from the run type: transient (V/I vs time), DC sweep, AC Bode (stacked magnitude-dB + phase-deg vs log frequency), noise (vs log frequency); a .step / Monte-Carlo run overlays every step as a labelled trace (or pass step for one). Full fidelity by default, with a min/max-preserving downsample above max_points (spikes survive; surfaced as a fact). Writes a self-contained HTML file and returns its path — into out_dir if given, else a '.ltspice-mcp/plots/' sidecar next to the circuit (for a job_id) or next to the raw (for a raw_file); on a host that supports MCP Apps the chart is also embedded as an interactive in-chat widget, otherwise it opens in your local browser.
Sibling egress, don't confuse: for numbers in your context use get_waveform (decimated); for every sample on disk use export_waveform (CSV); for a scalar use signal_stats/bode_metrics. This tool is for looking, not measuring.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| open | No | Open the written HTML in the local browser. Applies to terminal clients only — ignored when the chart is delivered as an in-chat widget (MCP Apps host). Set false to only write the file. | |
| step | No | For a .step run: omit to overlay ALL steps as separate traces, or give a 0-based step index to plot just that one. | |
| t_end | No | Window end in SPICE notation. | |
| format | No | Response format: 'json' for structured data, 'text' for human-readable | |
| job_id | No | Plot a specific run of a completed sweep/MC (or single) job instead of a raw_file path; pair with ``run_index``. | |
| out_dir | No | Directory to write the HTML into (resolved under an allowed path; created if needed). Default: a '.ltspice-mcp/plots/' sidecar next to the circuit for a job_id, or next to the raw for a raw_file. | |
| signals | No | Trace names to plot (e.g. ['V(out)', 'I(R1)']) or 'all' for every non-axis trace. | all |
| t_start | No | Window start in SPICE notation (e.g. '1m', '1k'); bounds the plotted range. | |
| annotate | No | Annotate an AC/Bode plot with detected corner markers (vertical lines) + an out-of-phase-zero / delay flag, from ac_structure. AC plots only; ignored for transient/DC. | |
| raw_file | No | Path to .raw result file. Pass this OR ``job_id`` (a job run), not both. | |
| run_index | No | 0-based run to read when ``job_id`` is given (default 0). | |
| max_points | No | Per-series point budget before a min/max-preserving downsample engages (default 100000). Full fidelity below this; spikes are preserved when it engages. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | No | ||
| opened | No | ||
| opener | No | ||
| panels | No | ||
| n_steps | No | ||
| signals | No | ||
| delivery | No | ||
| max_points | No | ||
| downsampled | No | ||
| window_used | No | ||
| observations | No | ||
| series_count | No | ||
| analysis_type | No | ||
| steps_plotted | No | ||
| points_per_series | No |