MCPcopy Create free account
hub / github.com/GongShichen/LuminaCode / Register

Method Register

tools/registry.go:31–40  ·  view source on GitHub ↗
(tool Tool)

Source from the content-addressed store, hash-verified

29}
30
31func (r *ToolRegistry) Register(tool Tool) {
32 if tool == nil {
33 return
34 }
35 if tool.ShouldDefer() {
36 r.deferred.Add(tool)
37 return
38 }
39 r.registerActive(tool, tool.Name())
40}
41
42func (r *ToolRegistry) Get(name string) Tool {
43 if tool, ok := r.tools[name]; ok {

Calls 4

registerActiveMethod · 0.95
AddMethod · 0.80
ShouldDeferMethod · 0.65
NameMethod · 0.65