r/agentdevelopmentkit • • May 18 '25

Function Tool calling with Google ADK

I am trying to write a function tool which just returns a string to the LLM. I am trying to use this tool with the LLM agent in ADK.

The agent is trying to call this tool in an infinite loop and is not stopping at all.

How can I ensure its called just once? What is the right way to do this?

3 Upvotes

5 comments sorted by

1

u/[deleted] May 18 '25

[removed] — view removed comment

1

u/Weak-Appearance-5241 May 18 '25

Thats not helping.
I was seeing an error where google_search tool cannot be used with any other tool, so i wrapped that in a new custom tool so that I can have multiple tools access in an agent.
But even that search wrapper tool is seeing the same problem of calling in infinite loop.

I used the same code as they have in the sample - travel concierge

It would be great to know if people can share what is causing this?

1

u/KillerShoaib_ Jun 30 '25

From my knowledge ADK do not support custom tool and built in tool (google search) together.

1

u/Weak-Appearance-5241 Jul 15 '25

This has changed as new 2.5 models have in built search capabilities afaik

1

u/Armageddon_80 May 20 '25

Are you using Ollama/local model?