Skip to main content
Glama
ProductOfAmerica

mcp-server-kicad

add_trace

Add a trace segment between two points.

Instructions

Add a trace segment between two points.

Args:
    x1: Start X
    y1: Start Y
    x2: End X
    y2: End Y
    width: Trace width in mm
    layer: Copper layer (e.g. "F.Cu", "B.Cu")
    net: A net number from list_pcb_nets, or 0 for no net. Any other number is refused
        and nothing is written, and so is every number but 0 on a board in KiCad 9's
        format or older that has no net table. A KiCad 10 board holds nets by name and
        its numbers are derived from where each net first appears, so read
        list_pcb_nets again after an edit.
    pcb_path: Path to .kicad_pcb file. Optional; omit to use the configured default.

Input Schema

NameRequiredDescriptionDefault
x1Yes
x2Yes
y1Yes
y2Yes
netNo
layerNoF.Cu
widthNo
pcb_pathNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.9.1

TDQS

A4.2/5.0
Behavior5/5

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

Beyond the annotations, it discloses rejection semantics precisely: an invalid net number is refused, nothing is written, and the same applies to any nonzero net on KiCad 9-format or older boards without a net table. It also explains the KiCad 10 name-derived net numbering quirk that makes stale net numbers dangerous, which is exactly the kind of non-obvious behavior an agent cannot infer from readOnlyHint=false alone.

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 purpose is front-loaded in one sentence and each subsequent line corresponds to a parameter, so nothing is padding. Points off for the raw docstring "Args:" formatting and for the net explanation, whose clause "and so is every number but 0 on a board in KiCad 9's format or older that has no net table" is dense enough to require re-reading.

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?

For an eight-parameter mutation with no schema descriptions, the description covers nearly everything an agent needs, and an output schema exists so return values need not be explained. Remaining gaps: coordinate units for x1/y1/x2/y2 are unstated (only width is marked mm), and there is no note that layer must be a valid copper layer from list_pcb_layers.

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% — properties carry only titles — so the description must carry the full burden, and it does: every one of the eight parameters is given meaning, including width units (mm), layer examples ("F.Cu", "B.Cu"), the net=0 sentinel, and that pcb_path is optional with a configured default.

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 first line states a specific verb and resource with scope: "Add a trace segment between two points." Combined with the parameter list (layer, net, width) an agent can tell this is a PCB copper routing primitive, distinct from schematic-side siblings like add_wires or generic add_pcb_line. It stops short of naming which sibling to prefer when the goal is a line rather than a net-assigned trace.

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

Usage Guidelines3/5

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

Usage is implied through prerequisites rather than stated: net numbers must come from list_pcb_nets, and on KiCad 10 boards list_pcb_nets must be re-read after each edit. That is real workflow routing, but there is no explicit when-to-use/when-not framing against alternatives such as add_via for layer transitions or add_pcb_line for non-copper geometry.

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