Package com.github.copilot.sdk.json
Class ElicitationContext
java.lang.Object
com.github.copilot.sdk.json.ElicitationContext
Context for an elicitation request received from the server or MCP tools.
- Since:
- 1.0.0
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGets the source that initiated the request (e.g., MCP server name).Gets the message describing what information is needed from the user.getMode()Gets the elicitation mode:"form"for structured input,"url"for browser redirect.Gets the JSON Schema describing the form fields to present (form mode only).Gets the session ID that triggered the elicitation request.getUrl()Gets the URL to open in the user's browser (url mode only).setElicitationSource(String elicitationSource) Sets the elicitation source.setMessage(String message) Sets the message.Sets the mode.setRequestedSchema(ElicitationSchema requestedSchema) Sets the schema.setSessionId(String sessionId) Sets the session ID.Sets the URL.
-
Constructor Details
-
ElicitationContext
public ElicitationContext()
-
-
Method Details
-
getSessionId
Gets the session ID that triggered the elicitation request. @return the session ID -
setSessionId
Sets the session ID. @param sessionId the session ID @return this -
getMessage
Gets the message describing what information is needed from the user.- Returns:
- the message
-
setMessage
Sets the message. @param message the message @return this -
getRequestedSchema
Gets the JSON Schema describing the form fields to present (form mode only).- Returns:
- the schema, or
null
-
setRequestedSchema
Sets the schema. @param requestedSchema the schema @return this -
getMode
Gets the elicitation mode:"form"for structured input,"url"for browser redirect.- Returns:
- the mode, or
null(defaults to"form")
-
setMode
Sets the mode. @param mode the mode @return this -
getElicitationSource
Gets the source that initiated the request (e.g., MCP server name).- Returns:
- the elicitation source, or
null
-
setElicitationSource
Sets the elicitation source. @param elicitationSource the source @return this -
getUrl
Gets the URL to open in the user's browser (url mode only).- Returns:
- the URL, or
null
-
setUrl
Sets the URL. @param url the URL @return this
-