MCPcopy Create free account
hub / github.com/53AI/53AIHub / encodeMCPMap

Function encodeMCPMap

api/controller/mcp_output.go:51–67  ·  view source on GitHub ↗
(input map[string]any)

Source from the content-addressed store, hash-verified

49}
50
51func encodeMCPMap(input map[string]any) map[string]any {
52 result := make(map[string]any, len(input))
53 for key, value := range input {
54 if isMCPIDField(key) {
55 if encodedValue, ok := encodeMCPIDValue(value); ok {
56 result[key] = encodedValue
57 continue
58 }
59 if encodedValues, ok := encodeMCPIDSlice(value); ok {
60 result[key] = encodedValues
61 continue
62 }
63 }
64 result[key] = encodeMCPValue(value)
65 }
66 return result
67}
68
69func encodeMCPSlice(input []any) []any {
70 result := make([]any, len(input))

Callers 1

encodeMCPValueFunction · 0.85

Calls 4

isMCPIDFieldFunction · 0.85
encodeMCPIDValueFunction · 0.85
encodeMCPIDSliceFunction · 0.85
encodeMCPValueFunction · 0.85

Tested by

no test coverage detected