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

Function stringSetFromAny

tools/mcp_schema.go:266–281  ·  view source on GitHub ↗
(value any)

Source from the content-addressed store, hash-verified

264}
265
266func stringSetFromAny(value any) map[string]struct{} {
267 out := map[string]struct{}{}
268 switch typed := value.(type) {
269 case []string:
270 for _, item := range typed {
271 out[item] = struct{}{}
272 }
273 case []any:
274 for _, item := range typed {
275 if text, ok := item.(string); ok {
276 out[text] = struct{}{}
277 }
278 }
279 }
280 return out
281}
282
283func copySchemaMap(in map[string]any) map[string]any {
284 out := make(map[string]any, len(in)+1)

Callers 2

BuildMCPInputSchemaFunction · 0.85
convertMCPPropertyFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected