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

Method GetTotalToolCount

pkg/tools/mcp/manager.go:118–127  ·  view source on GitHub ↗

GetTotalToolCount 获取所有 Server 提供的工具总数

()

Source from the content-addressed store, hash-verified

116
117// GetTotalToolCount 获取所有 Server 提供的工具总数
118func (m *MCPManager) GetTotalToolCount() int {
119 m.mu.RLock()
120 defer m.mu.RUnlock()
121
122 count := 0
123 for _, server := range m.servers {
124 count += server.GetToolCount()
125 }
126 return count
127}
128
129// RemoveServer 移除 MCP Server
130func (m *MCPManager) RemoveServer(serverID string) error {

Callers 2

mainFunction · 0.95

Calls 1

GetToolCountMethod · 0.80

Tested by 1