Files
crewAI/lib/crewai/tests/tools/test_base_tool.py
Devin AI 9dcbec1d1a fix: format tool arguments as valid JSON in system prompts
Fixes #4064

The tool arguments in system prompts were being displayed using Python's
string representation (single quotes, None) instead of proper JSON
(double quotes, null). This could confuse weaker LLMs when they try to
make tool calls.

Changes:
- Use json.dumps() to format args_schema in _generate_description()
- Update existing tests to expect JSON format
- Add new test to verify JSON validity of tool arguments

Co-Authored-By: João <joao@crewai.com>
2025-12-11 05:33:57 +00:00

9.7 KiB