Skip to main content
Glama

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

TableJSON Schema
NameRequiredDescriptionDefault
to_pinYes
from_pinYes
add_labelNo
add_junctionNo
to_componentYes
from_componentYes
corner_directionNoauto

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.3.0

TDQS

B3.4/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the full burden. It does disclose useful behavior: automatic pin-position calculation, Manhattan routing producing direct or L-shaped paths, junction defaulting to True, and label insertion. However, it omits whether this mutates the schematic, what happens on conflicts with existing wires, or any error/permission behavior.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The one-line summary is front-loaded, and the Args/Returns/Examples structure is easy to scan. It is long, and the Args section partly duplicates parameter names already visible in the schema, but given 0% schema coverage that repetition is largely justified.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Parameters are fully documented, routing modes explained, and return contents enumerated (though an output schema exists, so the Returns block is redundant rather than essential). The notable missing piece is usage guidance relative to the many sibling wire/label/junction tools.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must compensate and largely does: it documents all seven parameters, gives the corner_direction enum values with their heuristic meanings (schema declares no enum), and states the add_junction default. Minor gap: no format constraints on pin identifiers beyond examples.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The opening sentence names a specific verb and resource ('Connect two component pins') and adds the key differentiator of automatic orthogonal routing. It is clear what the tool does, though it never explicitly contrasts itself with the sibling add_wire or add_junction tools that also create wiring artifacts.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage through examples but never states when to prefer this high-level connector over add_wire/add_junction, nor any prerequisites (e.g., components must already exist, pins must be unconnected). No exclusions or alternative-routing guidance are given.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.