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.
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": {
"x1": "<x1>",
"y1": "<y1>",
"x2": "<x2>",
"y2": "<y2>"
},
"name": "add_trace"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| x1 | Yes | ||
| x2 | Yes | ||
| y1 | Yes | ||
| y2 | Yes | ||
| net | No | ||
| layer | No | F.Cu | |
| width | No | ||
| pcb_path | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |