If you bind an API key into two tools with functools.partial, they're both declared as partial with the functools.partial docstring. Only the last one stays registered, so weather calls run get_forecast.
A callable object documented only on __call__ shows that docstring in tool.description, but its declaration doesn't have one.
Repro on main (f33d492), Python 3.13:
from functools import partial
from google.adk.models.llm_request import LlmRequest
from google.adk.tools.function_tool import FunctionTool
def get_weather(key: str, city: str):
"""Current weather for a city."""
def get_forecast(key: str, city: str):
"""Forecast for a city."""
class OrderLookup:
def __call__(self, order_id: str):
"""Finds an order by id."""
req = LlmRequest()
req.append_tools([FunctionTool(partial(get_weather, "k")),
FunctionTool(partial(get_forecast, "k")),
FunctionTool(OrderLookup())])
for d in req.config.tools[0].function_declarations:
print(d.name, repr(d.description))
It logs Duplicate tool name 'partial', prints partial twice, then OrderLookup None. I'd expect each tool under its own name and docstring.
If you bind an API key into two tools with
functools.partial, they're both declared aspartialwith thefunctools.partialdocstring. Only the last one stays registered, so weather calls runget_forecast.A callable object documented only on
__call__shows that docstring intool.description, but its declaration doesn't have one.Repro on main (f33d492), Python 3.13:
It logs
Duplicate tool name 'partial', printspartialtwice, thenOrderLookup None. I'd expect each tool under its own name and docstring.