run_erc
Run KiCad's Electrical Rules Check on a whole schematic hierarchy to get a PASS, WARN, or FAIL verdict with all findings, even when KiCad is closed.
Instructions
Run KiCad's Electrical Rules Check on the whole schematic hierarchy with kicad-cli and return a verdict (PASS, WARN, FAIL, or UNVERIFIED when no report was produced) with every finding, keyed by stable ids and item UUIDs. Works whether or not KiCad is open.
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": {
"schematic_path": "<schematic_path>"
},
"name": "run_erc"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| severity | No | all (default) includes excluded violations flagged as excluded; default is errors and warnings only. | all |
| schematic_path | Yes | A .kicad_sch file, absolute or relative to the workspace. Any sheet of the project works; the root sheet is used. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| date | No | ||
| kind | Yes | ||
| notes | No | ||
| counts | No | errors, warnings, excluded, unconnected, parity, total. | |
| source | Yes | ||
| command | No | ||
| verdict | Yes | ||
| findings | No | ||
| exit_code | No | ||
| truncated | No | ||
| duration_s | No | ||
| report_path | No | ||
| kicad_version | No |