MCPcopy Create free account
hub / github.com/ForestHubAI/edge-agents / enumNames

Function enumNames

go/engine/memory/tools.go:123–130  ·  view source on GitHub ↗

enumNames returns the sorted keys of a name→uid map for use as a JSON schema enum. The sort is stable across calls so the schema doesn't churn.

(byName map[string]string)

Source from the content-addressed store, hash-verified

121// enumNames returns the sorted keys of a name→uid map for use as a JSON
122// schema enum. The sort is stable across calls so the schema doesn't churn.
123func enumNames(byName map[string]string) []string {
124 out := make([]string, 0, len(byName))
125 for k := range byName {
126 out = append(out, k)
127 }
128 sort.Strings(out)
129 return out
130}
131
132func newReadTool(byName map[string]string, mgr *Manager) llmproxy.FunctionTool {
133 return llmproxy.FunctionTool{

Callers 3

newReadToolFunction · 0.85
newAppendToolFunction · 0.85
newEditToolFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected