ADR-0003: Export Tool Naming and Aliases¶
Status: Accepted Date: 2026-06-16 Deciders: @oaslananka
Context¶
A review flagged that the same export format appeared under multiple tool names
(K3), risking agents picking the wrong tool and reviewers seeing an uncurated
surface. Investigating the actual registered surface (the mcp.tool()(...)
calls in src/kicad_mcp/tools/export.py) showed the duplication is narrower than the
raw function inventory suggests:
- The
sch_export_*andpcb_export_*functions (e.g.sch_export_svg,pcb_export_glb) are internal helpers, not registered tools. Only theexport_*wrappers are registered, so they are not agent-facing duplicates. export_stepzexports KiCad'sstpz(gzip-compressed STEP) format with a distinct--format/extension — a different output, not a duplicate ofexport_step.pcb_export_3d_pdf(3D PDF) andpcb_export_stats(structured JSON stats) are the sole registered tool for their respective outputs;get_board_statsreturns a human-readable text preview for a different purpose.
The one genuine case of two registered tools producing the same output is STEP:
export_step and export_3d_step both emit board.step.
Decision¶
- The canonical naming convention for export tools is
export_<format>— the dominant existing root. One canonical tool per output format. - A genuine same-output duplicate is kept for backward compatibility as a
deprecated alias through the central registrar
src/kicad_mcp/tools/aliases.py(register_alias+notify_deprecated): the alias stays registered and functional, delegates to the canonical tool, logs a one-time deprecation warning, and is recorded inALIASES. - Applying this now:
export_3d_stepbecomes a deprecated alias ofexport_step. export_stepz,pcb_export_3d_pdf,pcb_export_stats, andget_board_statsare not aliased — each is the only tool for a distinct output and was misread as a duplicate.
Consequences¶
- Public tool names are not removed or silently renamed; deprecated names keep working and emit a one-time, structured deprecation log (work order rule 6).
- New export tools must follow
export_<format>; a new same-format duplicate must be registered viaregister_alias, not as a second canonical tool. - The alias registrar is reusable for future surface curation (e.g. the orphaned-tool cleanup in ADR-tracked Phase 1 work).
Verification¶
tests/unit/test_tool_registry_consistency.py(no cross-category name collisions) andtests/integration/test_tool_surface_snapshot.pystay green.tests/integration/test_export_alias.pyassertsexport_3d_stepis registered, is inALIASESmapped toexport_step, and delegates to the same output.pnpm run docs:toolsreflects the deprecated-alias docstring.