MCPcopy Index your code
hub / github.com/modelcontextprotocol/registry / validateIcons

Function validateIcons

internal/validators/validators.go:237–252  ·  view source on GitHub ↗
(ctx *ValidationContext, icons []model.Icon)

Source from the content-addressed store, hash-verified

235}
236
237func validateIcons(ctx *ValidationContext, icons []model.Icon) *ValidationResult {
238 result := &ValidationResult{Valid: true, Issues: []ValidationIssue{}}
239
240 // Skip validation if no icons are provided (optional field)
241 if len(icons) == 0 {
242 return result
243 }
244
245 // Validate each icon
246 for i, icon := range icons {
247 iconResult := validateIcon(ctx.Index(i), &icon)
248 result.Merge(iconResult)
249 }
250
251 return result
252}
253
254func validateIcon(ctx *ValidationContext, icon *model.Icon) *ValidationResult {
255 result := &ValidationResult{Valid: true, Issues: []ValidationIssue{}}

Callers 1

ValidateServerJSONFunction · 0.85

Calls 3

MergeMethod · 0.95
validateIconFunction · 0.85
IndexMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…