diff --git a/src/google/adk/tools/function_tool.py b/src/google/adk/tools/function_tool.py index 3a168fb..a3bebd9 100644 --- a/src/google/adk/tools/function_tool.py +++ b/src/google/adk/tools/function_tool.py @@ -46,14 +46,14 @@ class FunctionTool(BaseTool): # Get documentation (prioritize direct __doc__ if available) if hasattr(func, '__doc__') and func.__doc__: - doc = func.__doc__ + doc = inspect.cleandoc(func.__doc__) elif ( hasattr(func, '__call__') and hasattr(func.__call__, '__doc__') and func.__call__.__doc__ ): # For callable objects, try to get docstring from __call__ method - doc = func.__call__.__doc__ + doc = inspect.cleandoc(func.__call__.__doc__) super().__init__(name=name, description=doc) self.func = func