Skip to content

Function <tool_name>- Not found in tools_dict #3320

@me-her

Description

@me-her

Describe the bug
When using Claude in google-adk . Even if the tool name is present, it gives me this tool not found error.
It only happens on the second try of the function call. It's super weird, haven't figured it out why.

I have other agents with Gemini Model, this behaviour doesn't happen.

I get this error

  File "/app/.venv/lib/python3.13/site-packages/google/adk/flows/llm_flows/functions.py", line 649, in _get_tool_and_context
    raise ValueError(
        f'Function {function_call.name} is not found in the tools_dict.'
    )
ValueError: Function query_surveys is not found in the tools_dict.

To Reproduce

from google.adk import Agent

from google.adk.models.anthropic_llm import Claude
from google.adk.models.registry import LLMRegistry
LLMRegistry.register(Claude)
claude_model="claude-sonnet-4-5@20250929"


root_agent = Agent(
    model=claude_model,
    name="root_agent",
    instruction=get_instruction(),
    tools=[query_surveys],
    description=(
        "Get's survey Information"
    ),
)

Expected behavior
It's not a wrong tool call since the tool name is right.

Desktop (please complete the following information):

  • OS: Linux
  • Python version(python -V): 3.12
  • ADK version(pip show google-adk): 1.16.0

Model Information:

  • Are you using LiteLLM: No
  • Which model is being used: "claude-sonnet-4-5@20250929" (vertexai)

Metadata

Metadata

Labels

models[Component] Issues related to model support

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions