FunctionTool declares every functools.partial as `partial` and drops the `__call__` docstring
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 74/100
Research direction
Start in google.adk.tools.function_tool.FunctionTool and google.adk.models.llm_request.LlmRequest, using the reported Python 3.13 reproduction to trace tool naming and declaration descriptions. Done means both functools.partial tools retain distinct names and docstrings, and OrderLookup's call docstring appears in its declaration.
Written by the indexing model from the issue text.
Description
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.
- Dominant language
- Python
- Stars
- 21.6k
- Forks
- 4k
- Avg merge
- 13h 49m
- Merged PRs (30d)
- 10
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from google/adk-python
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
google/adk-python#7217 · 1 comment ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
google/adk-python#7206 · 1 comment ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
google/adk-python#7205 · 1 comment ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
google/adk-python#7196 · 1 comment ·
-
eval request clarification
Difficulty 1/5 1-3 hours Newbie friendliness 86/100
google/adk-python#7146 · 2 comments · 1 assignee ·
All issues in google/adk-python
Similar issues
-
area/auth bug comp/agent P3 platform/discord type/security
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
NousResearch/hermes-agent#117848 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
bancolombia/sentinel#23 ·
-
test md OpenCI
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
-
integration:quickjs org:external priority:backlog topic:code-interpreter topic:middleware type:feature
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
langchain-ai/deepagents#6450 ·
-
bug client
Difficulty 2/5 1-3 hours Newbie friendliness 88/100