connect_components
Connect two component pins with automatic orthogonal routing to create L-shaped or direct wire paths in KiCad schematics.
Instructions
Connect two component pins with automatic orthogonal routing.
Uses Manhattan-style (orthogonal) routing to create L-shaped or direct wire paths between component pins. Automatically calculates pin positions and generates appropriate wire segments with optional junctions and labels.
Args: from_component: Source component reference (e.g., "R1") from_pin: Source pin number (e.g., "2") to_component: Destination component reference (e.g., "R2") to_pin: Destination pin number (e.g., "1") corner_direction: Routing direction preference: - "auto": Smart heuristic (horizontal if dx >= dy, else vertical) - "horizontal_first": Route horizontally then vertically - "vertical_first": Route vertically then horizontally add_label: Optional net label text to add at start of routing add_junction: Whether to add junction at L-shaped corners (default: True) ctx: MCP context for progress reporting (optional)
Returns: Dictionary with success status and connection information including: - from/to component and pin details with positions - routing type (direct or L-shaped) - segments list with start/end positions - wire_uuids list - junction_uuid (if junction was added) - label_uuid (if label was added)
Examples: >>> # Simple connection with auto routing >>> result = await connect_components("R1", "2", "R2", "1")
>>> # With label and horizontal-first routing
>>> result = await connect_components(
... "R1", "2", "R2", "1",
... corner_direction="horizontal_first",
... add_label="VCC"
... )
>>> # Vertical-first without junction
>>> result = await connect_components(
... "R1", "1", "C1", "1",
... corner_direction="vertical_first",
... add_junction=False
... )Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| to_pin | Yes | ||
| from_pin | Yes | ||
| add_label | No | ||
| add_junction | No | ||
| to_component | Yes | ||
| from_component | Yes | ||
| corner_direction | No | auto |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||