mirror of
https://github.com/Xe138/AI-Trader.git
synced 2026-04-01 17:17:24 -04:00
Root cause: FastMCP uses inspect module to generate tool schemas from function signatures. **kwargs prevents FastMCP from determining parameter types, causing tool registration to fail. Fix: Keep explicit parameters with defaults (signature=None, today_date=None, etc.) but document in docstring that they are auto-injected. This preserves: - ContextInjector always overrides values (defense-in-depth from v0.3.0-alpha.40) - FastMCP can generate proper tool schema - Parameters visible to AI, but with clear documentation they're automatic Trade-off: AI can still see the parameters, but documentation instructs not to provide them. Combined with ContextInjector override, AI-provided values are ignored anyway. Fixes TradeTools service crash on startup.