Class ElicitationContext

java.lang.Object
com.github.copilot.sdk.json.ElicitationContext

public class ElicitationContext extends Object
Context for an elicitation request received from the server or MCP tools.
Since:
1.0.0
  • Constructor Details

    • ElicitationContext

      public ElicitationContext()
  • Method Details

    • getSessionId

      public String getSessionId()
      Gets the session ID that triggered the elicitation request. @return the session ID
    • setSessionId

      public ElicitationContext setSessionId(String sessionId)
      Sets the session ID. @param sessionId the session ID @return this
    • getMessage

      public String getMessage()
      Gets the message describing what information is needed from the user.
      Returns:
      the message
    • setMessage

      public ElicitationContext setMessage(String message)
      Sets the message. @param message the message @return this
    • getRequestedSchema

      public ElicitationSchema getRequestedSchema()
      Gets the JSON Schema describing the form fields to present (form mode only).
      Returns:
      the schema, or null
    • setRequestedSchema

      public ElicitationContext setRequestedSchema(ElicitationSchema requestedSchema)
      Sets the schema. @param requestedSchema the schema @return this
    • getMode

      public String getMode()
      Gets the elicitation mode: "form" for structured input, "url" for browser redirect.
      Returns:
      the mode, or null (defaults to "form")
    • setMode

      public ElicitationContext setMode(String mode)
      Sets the mode. @param mode the mode @return this
    • getElicitationSource

      public String getElicitationSource()
      Gets the source that initiated the request (e.g., MCP server name).
      Returns:
      the elicitation source, or null
    • setElicitationSource

      public ElicitationContext setElicitationSource(String elicitationSource)
      Sets the elicitation source. @param elicitationSource the source @return this
    • getUrl

      public String getUrl()
      Gets the URL to open in the user's browser (url mode only).
      Returns:
      the URL, or null
    • setUrl

      public ElicitationContext setUrl(String url)
      Sets the URL. @param url the URL @return this