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

Method ListTools

pkg/tools/mcp/server.go:98–106  ·  view source on GitHub ↗

ListTools 返回已发现的工具列表

()

Source from the content-addressed store, hash-verified

96
97// ListTools 返回已发现的工具列表
98func (s *MCPServer) ListTools() []cloud.MCPTool {
99 s.mu.RLock()
100 defer s.mu.RUnlock()
101
102 // 返回副本
103 tools := make([]cloud.MCPTool, len(s.tools))
104 copy(tools, s.tools)
105 return tools
106}
107
108// GetToolCount 获取工具数量
109func (s *MCPServer) GetToolCount() int {

Callers 2

ConnectMethod · 0.45
mainFunction · 0.45

Calls 1

copyFunction · 0.85

Tested by

no test coverage detected