add_symbol
Add a new symbol to a KiCad library with pins, reference prefix, and optional body graphics. Creates the library file if missing.
Instructions
Add a new symbol definition to a .kicad_sym library.
Creates a complete symbol with pins and body graphics. If the library
file does not exist it will be created.
Args:
name: Symbol name (e.g. "MP4572GQB-P", "TLV75733PDBVR")
pins: Pin definitions — list of dicts, each with keys:
number (str): pin number, e.g. "1"
name (str): pin name, e.g. "VIN" ("~" for unnamed)
type (str): electrical type — "input", "output", "bidirectional",
"passive", "power_in", "power_out", "tri_state",
"open_collector", "open_emitter", "unconnected", "free"
x (float): X position in mm (default 0)
y (float): Y position in mm (default 0)
rotation (float): angle 0/90/180/270 (default 0)
length (float): pin length in mm (default 2.54)
reference_prefix: Reference prefix e.g. "U", "R", "C" (default "U")
is_power: True for power symbols (default False)
pin_names_offset: Pin name label offset in mm (default 0.508)
in_bom: Include in BOM (default True)
on_board: Place on board (default True)
footprint: Default footprint e.g. "Package_SO:SOIC-8" (default "")
datasheet: Datasheet URL (default "~")
rectangles: Optional body rectangle(s) — list of dicts with keys:
x1, y1, x2, y2 (float): corner coordinates in mm
fill (str): "none", "background", or "outline" (default "background")
If omitted, a rectangle is auto-computed from pin positions.
symbol_lib_path: Path to .kicad_sym file
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | ||
| pins | Yes | ||
| reference_prefix | No | U | |
| is_power | No | ||
| pin_names_offset | No | ||
| in_bom | No | ||
| on_board | No | ||
| footprint | No | ||
| datasheet | No | ~ | |
| rectangles | No | ||
| symbol_lib_path | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |