diff --git a/mcp-core/src/main/java/io/modelcontextprotocol/json/schema/JsonSchemaValidator.java b/mcp-core/src/main/java/io/modelcontextprotocol/json/schema/JsonSchemaValidator.java index 7eed33942..6e89ab70e 100644 --- a/mcp-core/src/main/java/io/modelcontextprotocol/json/schema/JsonSchemaValidator.java +++ b/mcp-core/src/main/java/io/modelcontextprotocol/json/schema/JsonSchemaValidator.java @@ -57,6 +57,11 @@ public static ValidationResponse asInvalid(String message) { /** * Validates the structured content against the provided JSON schema. + *
+ * If {@code structuredContent} is a {@link String}, it is treated as a serialized + * JSON document and parsed before validation; quote embedded strings accordingly (for + * example {@code "\"red\""} for the JSON string value {@code red}). Any other type is + * converted to its JSON representation directly. * @param schema The JSON schema to validate against. * @param structuredContent The structured content to validate. * @return A ValidationResponse indicating whether the validation was successful or