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

Function deferredToolScore

tools/deferred.go:119–135  ·  view source on GitHub ↗
(tool Tool, keywords []string)

Source from the content-addressed store, hash-verified

117}
118
119func deferredToolScore(tool Tool, keywords []string) int {
120 if len(keywords) == 0 {
121 return 1
122 }
123 nameLower := strings.ToLower(tool.Name())
124 hintLower := strings.ToLower(tool.SearchHint())
125 score := 0
126 for _, keyword := range keywords {
127 if strings.Contains(nameLower, keyword) {
128 score += 3
129 }
130 if strings.Contains(hintLower, keyword) {
131 score++
132 }
133 }
134 return score
135}

Callers 1

SearchMethod · 0.85

Calls 2

NameMethod · 0.65
SearchHintMethod · 0.65

Tested by

no test coverage detected