MCPcopy Index your code
hub / github.com/coder/coder / addTools

Method addTools

aibridge/mcp/server_proxy_manager.go:38–49  ·  view source on GitHub ↗
(tools []*Tool)

Source from the content-addressed store, hash-verified

36}
37
38func (s *ServerProxyManager) addTools(tools []*Tool) {
39 s.toolsMu.Lock()
40 defer s.toolsMu.Unlock()
41
42 if s.tools == nil {
43 s.tools = make(map[string]*Tool, len(tools))
44 }
45
46 for _, tool := range tools {
47 s.tools[tool.ID] = tool
48 }
49}
50
51// Init concurrently initializes all of its [ServerProxier]s.
52func (s *ServerProxyManager) Init(ctx context.Context) (outErr error) {

Callers 1

InitMethod · 0.95

Calls 2

LockMethod · 0.45
UnlockMethod · 0.45

Tested by

no test coverage detected