Run Electrical Rule Check
erc_runRun an electrical rule check (ERC) on a schematic and return structured diagnostics — the KiCad ERC step, over MCP.
CHECKS: duplicate reference designators; net endpoints naming an unknown component or pin; unconnected pins (ignoring hidden power pins and explicit no-connects); single-pin nets; driver conflicts (two outputs on one net); power_in pins with no power_out source; input pins with no driver; no-connect markers on connected or non-existent pins; incomplete differential pairs; empty nets.
INPUT: schematic (same shape as netlist_export), ignore (optional array of rule codes to suppress, e.g. ["erc.net-single-pin"]), treatUnspecifiedAsPassive (optional; when true an "unspecified" pin counts as passive for the input-not-driven check).
OUTPUT: { ok, counts: { error, warn, info }, diagnostics: [{ code, severity, message, hint?, locus: { component?, pin?, net? }, nextAction? }], checked: { components, nets, pins } }. ok is true when there are zero errors. Diagnostics use the same shape as kernelCAD geometry diagnostics, sorted error → warn → info, deterministically.
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": "<schematic>"
},
"name": "erc_run"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ignore | No | Rule codes to suppress, e.g. ["erc.net-single-pin"]. | |
| schematic | Yes | ||
| treatUnspecifiedAsPassive | No | When true, an "unspecified" pin counts as passive for the input-not-driven check. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||