Spice Check Netlist
spice_check_netlistValidate and inspect a SPICE netlist without running ngspice: parse elements, nodes, models, and subcircuits, detect errors like missing ground or floating nodes, and refuse unsupported directives.
Instructions
Check a netlist without running ngspice: parse it against the allow-list and report what it holds (elements by type, nodes, models, subcircuits) and what is wrong with it (no ground node 0, duplicate element names, a missing .model or .subckt, undefined controlling sources, floating nodes). A netlist that uses something the toolkit never runs (.control, .include, .lib, .write, A/N devices, 'file', 'external', random sources) is refused with the line number and the directive. Give the text ('netlist') or a file ('netlist_file'). Works without ngspice installed.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "spice_check_netlist"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| netlist | No | The netlist text (first line = title). Give this OR netlist_file. | |
| netlist_file | No | Path to a netlist file (.cir .sp .spice .net .ckt .txt). Give this OR netlist. |