Fix include_tags/exclude_tags ignored without tools in MCPConfig#3186
Fix include_tags/exclude_tags ignored without tools in MCPConfig#3186
Conversation
WalkthroughThe pull request includes documentation link updates and introduces validation logic for MCP server transformation configurations. In 🚥 Pre-merge checks | ✅ 6✅ Passed checks (6 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
🧪 Generate unit tests (beta)
No actionable comments were generated in the recent review. 🎉 Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Closes #3177.
When a server config in
mcpServersusedinclude_tagsorexclude_tagswithout also specifyingtools, the tags were silently ignored. The config parsed as a plainRemoteMCPServer/StdioMCPServer(which absorb unknown fields viaextra="allow") instead of theTransforming*variant that actually applies tag filtering.The fix makes
toolsoptional in_TransformingMCPServerMixin(defaulting to{}) and adds a model validator that requires at least one oftools,include_tags, orexclude_tagsto be present — so plain configs still parse as base types, but any config with transform-related fields gets the right type: