Skip to main content
Glama
ProductOfAmerica

mcp-server-kicad

wire_pins_to_net

Connects schematic pins to a named net with short wire stubs and net labels, refusing the whole call if any pin cannot be wired safely.

Instructions

Put each listed pin on the net named label_text, or refuse and write nothing.

Each pin gets a short wire stub pointing away from its symbol, with a net
label at the stub's end. When the stub would touch, overlap or cross
anything else on the sheet, or move a net into another net class, the
label goes on the pin end itself instead. No junction is ever written, and
a pin already on the net is left alone. The file is written once or not
at all.

The whole call is refused when any pin cannot be wired safely: its net may
already carry another name, it may reach something this tool cannot judge
(a bus, a sheet pin, a text variable, a copy of the pad on another sheet),
another part shares its reference, or every position is blocked. The
refusal lists every refused pin with a bracketed reason code such as
[names] or [touch], the obstacle, and a remedy. add_label and add_wires
check none of this, so they are no way around a refusal.

It places no PWR_FLAG: whether a net needs one depends on every driver on
the net, not on the pins in one call. Use add_power_symbol for that.

Args:
    pins: List of {"reference": "R1", "pin": "1"} dicts
    label_text: Net name (e.g. "GND", "VCC"), exactly as it should read: no surrounding
        spaces, no leading "/", no text variable ("${...}"), no bus syntax, not a KiCad
        auto name such as "Net-(R1-1)"
    direction: Stub direction: "auto" (away from the symbol), "left", "right", "up", "down"
    stub_length: Stub length in mm, a multiple of 1.27 up to 1000 (default 2.54)
    schematic_path: Path to .kicad_sch file. Optional; omit to use the configured default.

Input Schema

NameRequiredDescriptionDefault
pinsYes
directionNoauto
label_textYes
stub_lengthNo
schematic_pathNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv0.21.0
    • removedInput schema / properties / auto_pwr_flag
      Removed value: -{
      -  "default": true,
      -  "title": "Auto Pwr Flag",
      -  "type": "boolean"
      -}
    • addedInput schema / properties / direction / enum
      Added value: +[
      +  "auto",
      +  "left",
      +  "right",
      +  "up",
      +  "down"
      +]
  2. Changed4 schema fields changedv0.11.0
    • addedInput schema / $defs
      Added value: +{
      +  "PinRefSpec": {
      +    "description": "A reference to a pin on a placed component.",
      +    "properties": {
      +      "pin": {
      +        "title": "Pin",
      +        "type": "string"
      +      },
      +      "reference": {
      +        "title": "Reference",
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "reference",
      +      "pin"
      +    ],
      +    "title": "PinRefSpec",
      +    "type": "object"
      +  }
      +}
    • addedInput schema / properties / pins / items / $ref
      Added value: +"#/$defs/PinRefSpec"
    • removedInput schema / properties / pins / items / additionalProperties
      Removed value: -true
    • removedInput schema / properties / pins / items / type
      Removed value: -"object"
  3. First observedv0.9.1

TDQS

A4.7/5.0
Behavior5/5

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

Far exceeds the annotations (which only carry generic safety hints): it discloses no junction is ever written, pins already on the net are left alone, the file is written once or not at all, and the exact refusal conditions with bracketed reason codes like [names]/[touch]. This is precisely the mutation/atomicity/auth context an agent needs beyond structured fields.

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?

Front-loaded summary followed by tightly organized behavior, refusal, and Args sections; virtually no filler. It is long, but the length is largely justified by the tool's complexity, with only marginal redundancy in the refusal enumeration.

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

Completeness5/5

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

For a high-complexity atomic wiring operation it covers the happy path, the branch behavior (label at stub end vs pin end), atomicity, and the full refusal contract. Since an output schema exists, it correctly does not need to describe return values.

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

Parameters5/5

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

Schema coverage is 0%, and the description fully compensates: it spells out the pin dict shape, the strict label_text rules (no spaces, no leading '/', no '${...}', no bus syntax, not KiCad auto names), direction semantics ('auto' = away from symbol), and stub_length's multiple-of-1.27 / max-1000 constraint.

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

Purpose5/5

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

The opening sentence states a concrete verb+resource+scope: 'Put each listed pin on the net named label_text, or refuse and write nothing.' It is immediately distinguishable from siblings like add_wires, connect_pins, and add_label because it wires a whole pin list atomically to a named net.

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

Usage Guidelines4/5

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

It routes away from alternatives ('add_label and add_wires check none of this, so they are no way around a refusal') and defers one concern to a sibling ('Use add_power_symbol for that'). Clear context, but it never states a positive 'use this when' condition and gives no explicit exclusions beyond the refusal list.

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

Deploy Server

Other Tools