mirror of
https://github.com/googleapis/genai-toolbox.git
synced 2026-01-08 23:18:04 -05:00
This PR refactors the tool configuration and loading mechanism to use a dynamic registration pattern. Each tool package now registers itself with a central registry, and the server configuration code uses this registry to decode and initialize tools. Key changes: - Introduced tools.Register and tools.DecodeToolConfig for dynamic tool handling. - Removed direct imports of specific tool packages from internal/server/config.go. - Updated individual tool packages to include init() functions for self-registration. - Modified ToolKind constants to be local kind constants within each tool package. - Adjusted test files to reflect the changes in tool kind identifiers. This change simplifies adding new tools and decouples the server configuration from specific tool implementations. --------- Co-authored-by: Yuan Teoh <yuanteoh@google.com> Co-authored-by: Yuan <45984206+Yuan325@users.noreply.github.com>
688 B
688 B