There was an error while loading. Please reload this page.
1 parent bb0ca87 commit b31841eCopy full SHA for b31841e
1 file changed
mcp-core/src/main/java/io/modelcontextprotocol/json/schema/JsonSchemaValidator.java
@@ -57,6 +57,11 @@ public static ValidationResponse asInvalid(String message) {
57
58
/**
59
* Validates the structured content against the provided JSON schema.
60
+ * <p>
61
+ * If {@code structuredContent} is a {@link String}, it is treated as a serialized
62
+ * JSON document and parsed before validation; quote embedded strings accordingly (for
63
+ * example {@code "\"red\""} for the JSON string value {@code red}). Any other type is
64
+ * converted to its JSON representation directly.
65
* @param schema The JSON schema to validate against.
66
* @param structuredContent The structured content to validate.
67
* @return A ValidationResponse indicating whether the validation was successful or
0 commit comments