File tree Expand file tree Collapse file tree
mcp-core/src/main/java/io/modelcontextprotocol/json/schema Expand file tree Collapse file tree Original file line number Diff line number Diff line change 22
33on :
44 pull_request : {}
5+ workflow_dispatch : {}
56
67jobs :
78 build :
Original file line number Diff line number Diff line change @@ -57,6 +57,11 @@ public static ValidationResponse asInvalid(String message) {
5757
5858 /**
5959 * 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.
6065 * @param schema The JSON schema to validate against.
6166 * @param structuredContent The structured content to validate.
6267 * @return A ValidationResponse indicating whether the validation was successful or
You can’t perform that action at this time.
0 commit comments