Skip to main content
Glama

ipc_add_tracks

Add straight tracks and through vias on one net of the board in the PCB editor.

Instructions

Add straight tracks and through vias on one net of the board in the PCB editor.

KiCad adds the items in one undo step. The sizes come from the netclass of the net, or from the arguments (the router of the PCB editor uses the sizes that the user selected in the editor, which can be other sizes). KiCad checks no clearance: the answer tells the user to run DRC. The tool refuses a net that the board does not have. KiCad 10.0.6 must have the schematic editor closed (KiCad bug #24966).

When the running KiCad has the limit free_via (ipc_status), each via must be at an end of a new track of the same call: an other via gives an error. A track with the same start and end, and a via drill that is not smaller than the via size, give an error. After an error, the tool changed nothing.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "board_path": "<board_path>",
      "net": "<net>"
    },
    "name": "ipc_add_tracks"
  }
}

Input Schema

NameRequiredDescriptionDefault
netYesThe name of the net, for example "GND" or "/SDA" (case-sensitive).
viasNoThe positions of the through vias (mm).
tracksNoThe tracks: start, end (mm) and copper layer of each one.
width_mmNoThe track width. Default: the track width of the netclass.
board_pathYesThe path of the .kicad_pcb file that is open in the PCB editor.
via_size_mmNoThe via diameter. Default: the via size of the netclass.
via_drill_mmNoThe via drill. Default: the via drill of the netclass.

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.2.0

TDQS

A4.6/5.0
Behavior5/5

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

With no annotations, the description carries the whole burden and does so thoroughly: one undo step, sizes inherited from the netclass unless overridden, no clearance checking (run DRC afterwards), and atomic failure semantics ('After an error, the tool changed nothing'). It also enumerates the specific error conditions (unknown net, stray via under free_via, zero-length track, drill not smaller than size).

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?

Purpose is front-loaded and the remaining sentences are dense with non-redundant constraints. A few phrasings are clumsy ('an other via gives an error') and the version/bug-number aside interrupts the flow, but nothing is padding.

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 7-parameter mutation tool with an output schema, the description covers what an agent needs: prerequisites, defaults, failure modes, and post-conditions. Return-value detail is correctly left to the output schema, with only the DRC hint surfaced.

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 coverage is 100%, so the baseline is 3, but the description adds genuine meaning: width_mm, via_size_mm and via_drill_mm default to netclass values, and the drill-versus-size relationship is a validity constraint not expressed in the schema. It does not explain the interaction between the tracks and vias arrays beyond the free_via rule.

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 first sentence gives a specific verb (add), specific resources (straight tracks and through vias), and a precise scope (one net of the board in the PCB editor). That scope alone separates it from siblings like ipc_add_zone or add_wire without needing to open any schema.

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 supplies real preconditions: the net must exist on the board, KiCad 10.0.6 requires the schematic editor to be closed, and under the free_via limit each via must sit at an end of a new track in the same call. It never names an alternative tool or an explicit when-not case, so it stops short of full routing guidance.

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