chore: update yaml tag for tools

This commit is contained in:
Yuan Teoh
2026-01-22 17:11:12 -08:00
parent ad8df40791
commit 7f0c49a4df
369 changed files with 4707 additions and 5752 deletions

View File

@@ -26,11 +26,11 @@ import (
"github.com/googleapis/genai-toolbox/internal/util/parameters"
)
const kind string = "sqlite-sql"
const resourceType string = "sqlite-sql"
func init() {
if !tools.Register(kind, newConfig) {
panic(fmt.Sprintf("tool type %q already registered", kind))
if !tools.Register(resourceType, newConfig) {
panic(fmt.Sprintf("tool type %q already registered", resourceType))
}
}
@@ -49,7 +49,7 @@ type compatibleSource interface {
type Config struct {
Name string `yaml:"name" validate:"required"`
Type string `yaml:"kind" validate:"required"`
Type string `yaml:"type" validate:"required"`
Source string `yaml:"source" validate:"required"`
Description string `yaml:"description" validate:"required"`
Statement string `yaml:"statement" validate:"required"`
@@ -62,7 +62,7 @@ type Config struct {
var _ tools.ToolConfig = Config{}
func (cfg Config) ToolConfigType() string {
return kind
return resourceType
}
func (cfg Config) Initialize(srcs map[string]sources.Source) (tools.Tool, error) {