Class McpSchema

java.lang.Object
org.apache.juneau.rest.server.mcp.McpSchema

public final class McpSchema extends Object
Revision-neutral carrier for a tool's input schema.

Deliberately a carrier, not a structured bean: the core has no opinion about which JSON Schema dialect or keyword set a revision supports. Each revision's adapter is responsible for validating that the carried map is expressible in its own wire schema type, and for rejecting configurations that are not.

The supplied map is not copied; callers must not mutate a map after handing it over.

  • Method Details

    • of

      public static McpSchema of(JsonMap raw)
      Creates a schema carrier around a raw JSON Schema object.
      Parameters:
      raw - The schema as a JSON object. Can be null, which yields an empty schema.
      Returns:
      A new carrier. Never null.
    • toJsonMap

      public JsonMap toJsonMap()
      The carried schema.
      Returns:
      The schema map. Never null; not a copy.