Pcb Erc
pcb_ercRuns KiCad electrical rules checks on one .kicad_sch file, returning violation counts by severity and type with item descriptions and positions.
Instructions
Run KiCad's electrical rules check (kicad-cli sch erc, user-installed) on a copy of one .kicad_sch file. Values: error_count, warning_count, violation_count. data.violations lists them by type (pin_not_connected, pin_to_pin, lib_symbol_issues ...) and severity with the description and position in mm of each item; data.rule_set says which rules were used (KiCad's defaults, or the allow-listed severities and pin map from the .kicad_pro next to the file; use_project_files=false ignores it). Only the one file is checked: sub-sheets in other files are not copied. Symbol libraries are not visible, so lib_symbol_issues warnings appear for library symbols (the copy embedded in the file is used); they are split out in data.violations.library_warnings from the real findings. Raw report is an artifact. Needs kicad-cli.
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": "pcb_erc"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| max_violations | No | How many violations to list (0 to 1000); the counts by type are always complete | |
| schematic_path | Yes | Path to a .kicad_sch file, at most 50 MB | |
| use_project_files | No | True: use the allow-listed ERC settings of <name>.kicad_pro next to the file if it exists; false: KiCad defaults only |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ok | Yes | ||
| data | No | Non-quantity payload (reports, listings) | |
| error | No | ||
| value | No | Primary quantity result | |
| values | No | All named quantity results (includes the primary) | |
| warnings | No | ||
| artifacts | No | ||
| provenance | Yes | What produced the result and from which inputs. | |
| review_status | No | unreviewed |