MCPcopy Create free account
hub / github.com/github/gh-aw / ValidateMCPConfigWithSchema

Function ValidateMCPConfigWithSchema

pkg/parser/schema_validation.go:173–176  ·  view source on GitHub ↗

ValidateMCPConfigWithSchema validates MCP configuration using JSON schema. The caller is responsible for passing only the fields defined in the MCP config schema; additional tool-specific fields (e.g. auth, proxy-args) must be stripped before calling this function because the schema uses additionalP

(mcpConfig map[string]any)

Source from the content-addressed store, hash-verified

171// must be stripped before calling this function because the schema uses
172// additionalProperties: false.
173func ValidateMCPConfigWithSchema(mcpConfig map[string]any) error {
174 schemaValidationLog.Printf("Validating MCP configuration against JSON schema: %d fields", len(mcpConfig))
175 return validateWithSchema(mcpConfig, mcpConfigSchema, "MCP configuration")
176}
177
178// ValidateRepositoryPackageManifestWithSchemaAndLocation validates an aw.yml repository package manifest.
179func ValidateRepositoryPackageManifestWithSchemaAndLocation(manifest map[string]any, filePath string) error {

Callers 2

ValidateMCPConfigsFunction · 0.92

Calls 2

validateWithSchemaFunction · 0.85
PrintfMethod · 0.45

Tested by 1