Skip to content

The documentation on Toolsets does not render working code #5497

Description

@agherasim

Describe the Bug:
The documentation at https://adk.dev/tools-custom/#using-toolsets-with-agents, describing how to define Toolsets does not result in working code. A few problems:

  • there is no name attribute to FunctionTool declaration, as the name is derived from the function or class __name__;
  • the toolset is never called by the agent, and no get_tools method calls happen. This causes in the tools defined in toolset to not be found by agent and results in a fatal error.

Steps to Reproduce:
Please provide a numbered list of steps to reproduce the behavior:

  1. Install google-akd
  2. Create a new toolset, as described in the example
  3. Create a new agent using agent.yaml definition, load agent in runner using from_config;
  4. Import the toolset in the agent, using agent.yaml for definition

Expected Behavior:
The tools in the Toolset should be accessible to the agent defined in an agent.yaml.

Observed Behavior:
The tools defined in the Toolset cannot be found. When imported individually, the tools can be found and work as expected.

Environment Details:

  • ADK Library Version (pip show google-adk): 1.31.1
  • Desktop OS: macOS
  • Python Version (python -V): Python 3.13.5

Model Information:

  • Are you using LiteLLM: Yes
  • Which model is being used: gemini-3.1-flash-lite-preview

🟡 Optional Information

Providing this information greatly speeds up the resolution process.

Minimal Reproduction Code:
Please provide a code snippet or a link to a Gist/repo that isolates the issue.

How often has this issue occurred?:

  • Always (100%)

Metadata

Metadata

Assignees

Labels

documentation[Component] This issue is related to documentation, it will be transferred to adk-docsrequest clarification[Status] The maintainer need clarification or more information from the authorstale[Status] Issues which have been marked inactive since there is no user response

Type

No fields configured for Bug.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions