You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
✅ Type Safety: Tool schemas derived from TypeScript signatures
✅ DRY: Single source of truth (handler signature)
✅ Reduced Boilerplate: 1800+ lines eliminated
✅ Auto-completion: Better IDE support
✅ Validation: Compile-time checks for tool definitions
Implementation Plan
Create decorator system (@MCPTool, @MCPParam)
Build schema generator (TypeScript AST parsing)
Migrate existing tools incrementally
Generate tool-definitions.ts in build step
Update server.ts to use generated definitions
Acceptance Criteria
server.ts reduced to <300 lines
All 59 tools migrated to decorator pattern
Tool definitions auto-generated in build
Zero manual tool schema writing
Build passing, all tests green
Documentation updated
Priority
🔴 Critical - Blocks scalability of adding new tools
Problem
src/core/mcp/server.tsis 2013 lines, with:Current approach: Manually write tool schema for every handler method.
Impact
Proposed Solution
Auto-generate Tool Definitions from Handler Signatures
Auto-generated output:
Architecture
Benefits
✅ Type Safety: Tool schemas derived from TypeScript signatures
✅ DRY: Single source of truth (handler signature)
✅ Reduced Boilerplate: 1800+ lines eliminated
✅ Auto-completion: Better IDE support
✅ Validation: Compile-time checks for tool definitions
Implementation Plan
@MCPTool,@MCPParam)tool-definitions.tsin build stepAcceptance Criteria
Priority
🔴 Critical - Blocks scalability of adding new tools
Effort Estimate
2 days