Documentation
¶
Overview ¶
Package registry provides toolkit registration and management.
Index ¶
- func RegisterBuiltinFactories(r *Registry)
- type Loader
- type LoaderConfig
- type Registry
- func (r *Registry) All() []Toolkit
- func (r *Registry) AllTools() []string
- func (r *Registry) Close() error
- func (r *Registry) CreateAndRegister(cfg ToolkitConfig) error
- func (r *Registry) Get(kind, name string) (Toolkit, bool)
- func (r *Registry) GetByKind(kind string) []Toolkit
- func (r *Registry) Register(toolkit Toolkit) error
- func (r *Registry) RegisterAllTools(s *mcp.Server)
- func (r *Registry) RegisterFactory(kind string, factory ToolkitFactory)
- func (r *Registry) SetQueryProvider(provider query.Provider)
- func (r *Registry) SetSemanticProvider(provider semantic.Provider)
- type Toolkit
- type ToolkitConfig
- type ToolkitFactory
- type ToolkitKindConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterBuiltinFactories ¶
func RegisterBuiltinFactories(r *Registry)
RegisterBuiltinFactories registers all built-in toolkit factories.
Types ¶
type Loader ¶
type Loader struct {
// contains filtered or unexported fields
}
Loader loads toolkits from configuration.
func (*Loader) Load ¶
func (l *Loader) Load(cfg LoaderConfig) error
Load loads toolkits from configuration.
type LoaderConfig ¶
type LoaderConfig struct {
Toolkits map[string]ToolkitKindConfig `yaml:"toolkits"`
}
LoaderConfig holds configuration for loading toolkits.
type Registry ¶
type Registry struct {
// contains filtered or unexported fields
}
Registry manages toolkit registration and lifecycle.
func (*Registry) CreateAndRegister ¶
func (r *Registry) CreateAndRegister(cfg ToolkitConfig) error
CreateAndRegister creates a toolkit from config and registers it.
func (*Registry) RegisterAllTools ¶
RegisterAllTools registers all tools from all toolkits with the MCP server.
func (*Registry) RegisterFactory ¶
func (r *Registry) RegisterFactory(kind string, factory ToolkitFactory)
RegisterFactory registers a toolkit factory for a kind.
func (*Registry) SetQueryProvider ¶
SetQueryProvider sets the query provider for all toolkits.
func (*Registry) SetSemanticProvider ¶
SetSemanticProvider sets the semantic provider for all toolkits.
type Toolkit ¶
type Toolkit interface {
// Kind returns the toolkit type (e.g., "trino", "datahub", "s3").
Kind() string
// Name returns the instance name from config.
Name() string
// RegisterTools registers all tools with the MCP server.
RegisterTools(s *mcp.Server)
// Tools returns a list of tool names provided by this toolkit.
Tools() []string
// SetSemanticProvider sets the semantic metadata provider for enrichment.
SetSemanticProvider(provider semantic.Provider)
// SetQueryProvider sets the query execution provider for enrichment.
SetQueryProvider(provider query.Provider)
// Close releases resources.
Close() error
}
Toolkit is the interface that all composable toolkits must implement.
func DataHubFactory ¶
DataHubFactory creates a DataHub toolkit from configuration.
type ToolkitConfig ¶
type ToolkitConfig struct {
Kind string
Name string
Enabled bool
Config map[string]interface{}
Default bool
}
ToolkitConfig holds configuration for a toolkit instance.
type ToolkitFactory ¶
ToolkitFactory creates a toolkit from configuration.