feat: add route_pad_to_pad tool

Convenience wrapper around route_trace that eliminates the need for
separate get_pad_position calls before routing.

- Accepts fromRef/fromPad/toRef/toPad instead of raw coordinates
- Automatically looks up pad positions from board footprints
- Auto-detects net from pad assignment (overridable via net param)
- Returns fromPad/toPad position info in response
- Saves ~2 tool calls (64+ calls for a full TMC2209 board) vs 3-step flow

Registered in: routing.py, kicad_interface.py (dispatch), routing.ts (MCP)
This commit is contained in:
Tom
2026-03-01 14:52:45 +01:00
parent b33d6e22fd
commit f0d738fff1
3 changed files with 119 additions and 0 deletions

View File

@@ -308,6 +308,7 @@ class KiCADInterface:
"add_text": self.board_commands.add_text,
"add_board_text": self.board_commands.add_text, # Alias for TypeScript tool
# Component commands
"route_pad_to_pad": self.routing_commands.route_pad_to_pad,
"place_component": self._handle_place_component,
"move_component": self.component_commands.move_component,
"rotate_component": self.component_commands.rotate_component,