sch_build_circuit
Create or replace an entire KiCad schematic from structured symbol, wire, and label data. Ensures routable connections with auto-layout and grid snapping.
Instructions
Build (overwrite) the active schematic from structured symbol, wire, and label inputs.
IMPORTANT: This tool replaces the entire schematic content. Any symbols
already placed in the schematic will be lost. To add symbols to an existing
schematic without erasing it use sch_add_symbol / sch_add_wire /
sch_add_label instead.
Coordinates are snapped to the 2.54 mm grid by default. When no coordinates
are provided for a symbol, set auto_layout=True so the placement engine
assigns non-overlapping positions automatically. If nets are also provided
the layout is connection-aware and generates Manhattan wire segments from
symbol pins. Nets that cannot resolve to at least two routable endpoints
raise a clear error instead of silently producing a disconnected schematic.
Recommended workflow:
Call
sch_find_free_placement(count=N)to obtain safe coordinates.Pass those coordinates in the
symbolslist.OR set
auto_layout=Trueand omit coordinates entirely.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| nets | No | ||
| wires | No | ||
| labels | No | ||
| symbols | No | ||
| auto_layout | No | ||
| snap_to_grid | No | ||
| power_symbols | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |