Skip to content

Update A Simple Math Toolset example code#1697

Merged
koverholt merged 5 commits into
google:mainfrom
AlejandroBlanco2001:fix/FuncToolsBaseToolsetParams
Apr 28, 2026
Merged

Update A Simple Math Toolset example code#1697
koverholt merged 5 commits into
google:mainfrom
AlejandroBlanco2001:fix/FuncToolsBaseToolsetParams

Conversation

@AlejandroBlanco2001

@AlejandroBlanco2001 AlejandroBlanco2001 commented Apr 28, 2026

Copy link
Copy Markdown
Contributor

The A Simple Math Toolset example contains a documentation error that still uses params a names of older versions, this PR is updating the docs to use the new params and ways to do it.

  • Removing the name parameter of the FunctionTool because this param don't exist no more.
  • Using the call to the parent class with the tool_name_prefix to achieve the same effect of modifying the call names of the tools.

Working example

image

@netlify

netlify Bot commented Apr 28, 2026

Copy link
Copy Markdown

Deploy Preview for adk-docs-preview ready!

Name Link
🔨 Latest commit 2aaa044
🔍 Latest deploy log https://app.netlify.com/projects/adk-docs-preview/deploys/69f0f84041d7420008a84028
😎 Deploy Preview https://deploy-preview-1697--adk-docs-preview.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@AlejandroBlanco2001 AlejandroBlanco2001 changed the title fix: working code for the new version Update A Simple Math Toolset example code Apr 28, 2026

@koverholt koverholt left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the PR and debugging/updating this code sample to work with the latest API. ❤️

I made some additional update to the code sample to remove the trailing underscore from the prefix and replace Runner with InMemoryRunner/run_debug for a self-contained runnable code sample. LGTM, merging!

@koverholt koverholt merged commit 32ca424 into google:main Apr 28, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants