diff --git a/go.mod b/go.mod index 78bc1ec..2422cec 100644 --- a/go.mod +++ b/go.mod @@ -113,3 +113,5 @@ require ( gopkg.in/go-jose/go-jose.v2 v2.6.3 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) + +replace github.com/shaharia-lab/goai => ../goai diff --git a/go.sum b/go.sum index 2d5948e..dcdb8f4 100644 --- a/go.sum +++ b/go.sum @@ -167,8 +167,6 @@ github.com/rogpeppe/go-internal v1.13.1/go.mod h1:uMEvuHeurkdAXX61udpOXGD/AzZDWN github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/sagikazarmark/locafero v0.8.0 h1:mXaMVw7IqxNBxfv3LdWt9MDmcWDQ1fagDH918lOdVaQ= github.com/sagikazarmark/locafero v0.8.0/go.mod h1:UBUyz37V+EdMS3hDF3QWIiVr/2dPrx49OMO0Bn0hJqk= -github.com/shaharia-lab/goai v0.12.0 h1:s177idIsM6GJhX3JJmyZRZ+4ve5pJnQ/QL3FaC4fMsc= -github.com/shaharia-lab/goai v0.12.0/go.mod h1:EKzvGwFBTL8eLUIw3pTA+X18IMjfy5mncFQXhvQCnAo= github.com/shaharia-lab/mcp-tools v0.0.5 h1:Hwfigbu0CVLhGHDuqZpFxmUBGEfHiHsYj9phiP/ZQbM= github.com/shaharia-lab/mcp-tools v0.0.5/go.mod h1:fcAmptmJ+RhK7zwAM+dpIr6cCOtjJyn3yKjvPj98DYw= github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ= diff --git a/internal/config/config.go b/internal/config/config.go index 8cf349b..7d7c93b 100644 --- a/internal/config/config.go +++ b/internal/config/config.go @@ -17,7 +17,7 @@ type Config struct { Tracing TracingConfig `mapstructure:"tracing"` Auth AuthConfig `mapstructure:"auth"` GoogleServiceConfig GoogleConfig `mapstructure:"google"` - Tools *tools.ToolsConfig `yaml:"tools" validate:"required"` + Tools *tools.ToolsConfig `mapstructure:"tools"` } // TracingConfig holds the configuration for the tracing service @@ -72,7 +72,7 @@ func Load(configFile string) (*Config, error) { return nil, err } - // Unmarshal the config into our struct + // Unmarshal into struct if err := viper.Unmarshal(&cfg); err != nil { return nil, err } diff --git a/internal/tools/registry.go b/internal/tools/registry.go index 593451f..b5ffdea 100644 --- a/internal/tools/registry.go +++ b/internal/tools/registry.go @@ -62,10 +62,7 @@ func (r *Registry) Init() error { } if r.config.Postgres.IsEnabled() { - postgres := mcptools.NewPostgreSQL(r.logger, mcptools.PostgreSQLConfig{ - DefaultDatabase: r.config.Postgres.Databases[0].Name, - BlockedCommands: r.config.Postgres.Databases[0].BlockedCommands, - }) + postgres := mcptools.NewPostgreSQL(r.logger, mcptools.PostgreSQLConfig{}) r.AddTool(mcptools.PostgreSQLToolName, postgres.PostgreSQLAllInOneTool()) }