mirror of
https://github.com/crewAIInc/crewAI.git
synced 2026-05-05 01:02:37 +00:00
Fixes #4796 CrewAI's tool execution framework injects a security_context parameter into tool arguments via _add_fingerprint_metadata(). MCP tools created via create_model_from_schema() defaulted to ConfigDict(extra='forbid'), causing Pydantic validation to fail with 'Extra inputs are not permitted'. This change passes ConfigDict(extra='ignore') when creating Pydantic models for MCP tool schemas, so that extra fields like security_context are silently dropped during validation instead of raising errors. Changes: - lib/crewai-tools: MCPServerAdapter's CrewAIToolAdapter now creates args models with extra='ignore' - lib/crewai: Native MCP tool resolver also uses extra='ignore' - Added regression tests for both the adapter and schema utils Co-Authored-By: João <joao@crewai.com>