feat: load IPC API annotations at startup to enrich tool descriptions
Adds python/annotations/loader.py (AnnotationLoader) which resolves MCP
tool names to KiCad IPC proto message annotations using three layers:
1. Explicit TOOL_TO_PROTO mapping for non-obvious name pairs
2. Automatic snake_case → PascalCase conversion
3. Suffix-stripped variants (get_nets_list → GetNets)
Integrates into kicad_interface.py tools/list handler:
- Tools with existing schemas: enrich_schema() adds blocking/interactive
ToolAnnotations hints and fills description gaps
- Tools without schemas (fallback): gets a real description from the
IPC annotation instead of the generic "KiCAD command: <name>" string
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
4
python/annotations/__init__.py
Normal file
4
python/annotations/__init__.py
Normal file
@@ -0,0 +1,4 @@
|
||||
"""KiCad IPC API tool annotations package."""
|
||||
from .loader import AnnotationLoader
|
||||
|
||||
__all__ = ["AnnotationLoader"]
|
||||
Reference in New Issue
Block a user