Class ElicitResult

java.lang.Object
org.apache.juneau.bean.mcp.v20260728.ElicitResult

@Marshalled public class ElicitResult extends Object
The end user's answer to an ElicitRequest (MCP 2026-07-28 SEP-2322), echoed back keyed by the same server-assigned id in a follow-up request's inputResponses and decoded via org.apache.juneau.rest.server.mcp.v20260728.ElicitationResponses.

getContent() is present only when getAction() is ElicitAction.ACCEPT; its shape is whatever ElicitRequest.getRequestedSchema() described, which is per-elicitation and unknowable at the bean-definition level, so it is deliberately left an untyped, dynamic map.

  • Constructor Details

  • Method Details

    • getAction

      The end user's choice.
      Returns:
      The action, or null if not set.
    • setAction

      Sets the end user's choice.
      Parameters:
      value - The new value. Can be null to unset the property.
      Returns:
      This object (for method chaining).
    • getContent

      The schema-shaped answer content. Present only when getAction() is ElicitAction.ACCEPT.
      Returns:
      The content map, or null if not set.
    • setContent

      Sets the schema-shaped answer content.
      Parameters:
      value - The new value. Can be null to unset the property.
      Returns:
      This object (for method chaining).
    • putContent

      public ElicitResult putContent(String name, Object value)
      Convenience method to add a single content entry.
      Parameters:
      name - The entry name. Can be null (LinkedHashMap tolerates a null key).
      value - The entry value. Can be null (stored as null).
      Returns:
      This object (for method chaining).