MCPcopy Create free account
hub / github.com/astercloud/aster / Create

Method Create

pkg/tools/interface.go:170–177  ·  view source on GitHub ↗

Create 创建工具实例

(name string, config map[string]any)

Source from the content-addressed store, hash-verified

168
169// Create 创建工具实例
170func (r *Registry) Create(name string, config map[string]any) (Tool, error) {
171 factory, ok := r.factories[name]
172 if !ok {
173 return nil, &ToolNotFoundError{Name: name}
174 }
175
176 return factory(config)
177}
178
179// List 列出所有已注册的工具
180func (r *Registry) List() []string {

Callers 2

mainFunction · 0.95
mainFunction · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected