diff --git a/src/crewai_tools/tools/base_tool.py b/src/crewai_tools/tools/base_tool.py index 4e0bd1fd5..dff1e37aa 100644 --- a/src/crewai_tools/tools/base_tool.py +++ b/src/crewai_tools/tools/base_tool.py @@ -86,13 +86,16 @@ class BaseTool(BaseModel, ABC): ) def _generate_description(self): - args = [] - for arg, attribute in self.args_schema.schema()["properties"].items(): - if "type" in attribute: - args.append(f"{arg}: '{attribute['type']}'") + args = [] + args_description = [] + for arg, attribute in self.args_schema.schema()["properties"].items(): + if "type" in attribute: + args.append(f"{arg}: '{attribute['type']}'") + if "description" in attribute: + args_description.append(f"{arg}: '{attribute['description']}'") - description = self.description.replace("\n", " ") - self.description = f"{self.name}({', '.join(args)}) - {description}" + description = self.description.replace("\n", " ") + self.description = f"{self.name}({', '.join(args)}) - {description} {', '.join(args_description)}" class Tool(BaseTool):