diff --git a/src/crewai/cli/templates/crew/tools/custom_tool.py b/src/crewai/cli/templates/crew/tools/custom_tool.py index 50bffa505..154beae8e 100644 --- a/src/crewai/cli/templates/crew/tools/custom_tool.py +++ b/src/crewai/cli/templates/crew/tools/custom_tool.py @@ -10,7 +10,7 @@ class MyCustomToolInput(BaseModel): class MyCustomTool(BaseTool): name: str = "Name of my tool" description: str = ( - "Clear description for what this tool is useful for, you agent will need this information to use it." + "Clear description for what this tool is useful for, your agent will need this information to use it." ) args_schema: Type[BaseModel] = MyCustomToolInput diff --git a/src/crewai/cli/templates/flow/tools/custom_tool.py b/src/crewai/cli/templates/flow/tools/custom_tool.py index e669b6c3b..718d2be1b 100644 --- a/src/crewai/cli/templates/flow/tools/custom_tool.py +++ b/src/crewai/cli/templates/flow/tools/custom_tool.py @@ -13,7 +13,7 @@ class MyCustomToolInput(BaseModel): class MyCustomTool(BaseTool): name: str = "Name of my tool" description: str = ( - "Clear description for what this tool is useful for, you agent will need this information to use it." + "Clear description for what this tool is useful for, your agent will need this information to use it." ) args_schema: Type[BaseModel] = MyCustomToolInput diff --git a/tests/tools/test_base_tool.py b/tests/tools/test_base_tool.py index cd4b53caf..9f46b13ba 100644 --- a/tests/tools/test_base_tool.py +++ b/tests/tools/test_base_tool.py @@ -6,14 +6,14 @@ from crewai.tools import BaseTool, tool def test_creating_a_tool_using_annotation(): @tool("Name of my tool") def my_tool(question: str) -> str: - """Clear description for what this tool is useful for, you agent will need this information to use it.""" + """Clear description for what this tool is useful for, your agent will need this information to use it.""" return question # Assert all the right attributes were defined assert my_tool.name == "Name of my tool" assert ( my_tool.description - == "Tool Name: Name of my tool\nTool Arguments: {'question': {'description': None, 'type': 'str'}}\nTool Description: Clear description for what this tool is useful for, you agent will need this information to use it." + == "Tool Name: Name of my tool\nTool Arguments: {'question': {'description': None, 'type': 'str'}}\nTool Description: Clear description for what this tool is useful for, your agent will need this information to use it." ) assert my_tool.args_schema.schema()["properties"] == { "question": {"title": "Question", "type": "string"} @@ -27,7 +27,7 @@ def test_creating_a_tool_using_annotation(): assert ( converted_tool.description - == "Tool Name: Name of my tool\nTool Arguments: {'question': {'description': None, 'type': 'str'}}\nTool Description: Clear description for what this tool is useful for, you agent will need this information to use it." + == "Tool Name: Name of my tool\nTool Arguments: {'question': {'description': None, 'type': 'str'}}\nTool Description: Clear description for what this tool is useful for, your agent will need this information to use it." ) assert converted_tool.args_schema.schema()["properties"] == { "question": {"title": "Question", "type": "string"} @@ -41,7 +41,7 @@ def test_creating_a_tool_using_annotation(): def test_creating_a_tool_using_baseclass(): class MyCustomTool(BaseTool): name: str = "Name of my tool" - description: str = "Clear description for what this tool is useful for, you agent will need this information to use it." + description: str = "Clear description for what this tool is useful for, your agent will need this information to use it." def _run(self, question: str) -> str: return question @@ -52,7 +52,7 @@ def test_creating_a_tool_using_baseclass(): assert ( my_tool.description - == "Tool Name: Name of my tool\nTool Arguments: {'question': {'description': None, 'type': 'str'}}\nTool Description: Clear description for what this tool is useful for, you agent will need this information to use it." + == "Tool Name: Name of my tool\nTool Arguments: {'question': {'description': None, 'type': 'str'}}\nTool Description: Clear description for what this tool is useful for, your agent will need this information to use it." ) assert my_tool.args_schema.schema()["properties"] == { "question": {"title": "Question", "type": "string"} @@ -64,7 +64,7 @@ def test_creating_a_tool_using_baseclass(): assert ( converted_tool.description - == "Tool Name: Name of my tool\nTool Arguments: {'question': {'description': None, 'type': 'str'}}\nTool Description: Clear description for what this tool is useful for, you agent will need this information to use it." + == "Tool Name: Name of my tool\nTool Arguments: {'question': {'description': None, 'type': 'str'}}\nTool Description: Clear description for what this tool is useful for, your agent will need this information to use it." ) assert converted_tool.args_schema.schema()["properties"] == { "question": {"title": "Question", "type": "string"} @@ -78,7 +78,7 @@ def test_creating_a_tool_using_baseclass(): def test_setting_cache_function(): class MyCustomTool(BaseTool): name: str = "Name of my tool" - description: str = "Clear description for what this tool is useful for, you agent will need this information to use it." + description: str = "Clear description for what this tool is useful for, your agent will need this information to use it." cache_function: Callable = lambda: False def _run(self, question: str) -> str: @@ -92,7 +92,7 @@ def test_setting_cache_function(): def test_default_cache_function_is_true(): class MyCustomTool(BaseTool): name: str = "Name of my tool" - description: str = "Clear description for what this tool is useful for, you agent will need this information to use it." + description: str = "Clear description for what this tool is useful for, your agent will need this information to use it." def _run(self, question: str) -> str: return question