ElicitRequestURLParams

data class ElicitRequestURLParams(val message: String, val elicitationId: String, val url: String, val task: TaskMetadata? = null, val meta: RequestMeta? = null) : ElicitRequestParams(source)

Represents URL mode parameters for an elicitation/create request.

Directs the user to an external URL for out-of-band interactions (e.g., OAuth flows, payment processing, or entering sensitive credentials) that must not pass through the MCP client.

Handling the url is the responsibility of the host application: it should require HTTPS, clearly display the target domain, obtain explicit user consent, and open the URL in a secure browser context. The SDK neither opens, fetches, nor validates the URL. URLs must only appear in URL-mode requests — never render a URL from a form-mode request as a clickable link.

Constructors

Link copied to clipboard
constructor(message: String, elicitationId: String, url: String, task: TaskMetadata? = null, meta: RequestMeta? = null)

Properties

Link copied to clipboard

A unique identifier for this elicitation. The client MUST treat this ID as an opaque value.

Link copied to clipboard
open override val message: String

The message explaining why the interaction is needed.

Link copied to clipboard
@SerialName(value = "_meta")
open override val meta: RequestMeta?

Optional metadata. May include a progressToken for out-of-band progress notifications.

Link copied to clipboard

The elicitation mode discriminator, always "url".

Link copied to clipboard

If specified, the caller is requesting task-augmented execution. The request will return a CreateTaskResult immediately, and the actual result can be retrieved later via tasks/result.

Link copied to clipboard
val url: String

The URL that the user should navigate to.