Pcb Info
pcb_infoRead KiCad .kicad_pcb files without KiCad and extract board statistics, layers, nets, tracks, vias, footprints, zones, and parse issues; optionally validate results against kicad-cli.
Instructions
Read a KiCad board (.kicad_pcb, at most 50 MB) with the toolkit's own parser; KiCad is not needed. Returns values (mm and counts): track_length_total, track_count, via_count, footprint_count, net_count, copper_layers, zone_count, and board_width and board_height from the Edge.Cuts outline (centre lines); data: format version, layer names, nets with their pads/tracks/vias/length, footprints (reference, value, x/y in mm with y pointing DOWN, angle, side, pads), pad types and drills, tracks by layer (count, length, widths), vias (kinds, drills, sizes), zones (name, net, layers, outline area), parse_issues (damaged elements that were skipped) and ignored_elements. Files from KiCad 5 to 10 are read. Refuses a file that is not a KiCad board, is nested deeper than 64 levels, holds more than 1,000,000 elements, or has a coordinate beyond 10 m. Set check_with_kicad to compare its counts, outline and footprint positions with kicad-cli's own statistics and position file (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": {
"board_path": "<board_path>"
},
"name": "pcb_info"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| board_path | Yes | Path to a .kicad_pcb file, at most 50 MB | |
| max_listed | No | How many footprints, nets and zones to list in data (0 to 1000); counts are always complete | |
| check_with_kicad | No | True: also compare counts, outline and footprint positions with kicad-cli's own export (needs kicad-cli) |
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 |