onElicitationRequestTyped method

  1. @override
void onElicitationRequestTyped(
  1. Future<ElicitResult> handler(
    1. ElicitRequestParams request
    )
)
override

Typed variant of onElicitationRequest. The handler receives the request params — ElicitRequestFormParams (form mode; each field of requestedSchema.properties reads as a PrimitiveSchemaDefinition) or ElicitRequestURLParams (mode: "url", 2025-11-25) — and returns an ElicitResult.

This is a convenience over the raw-map path; the wire behavior is identical. Registering either handler overrides the other (both bind the same elicitation/create slot). As with onElicitationRequest, the client answers only when it declared elicitation in its ClientCapabilities.

Implementation

@override
void onElicitationRequestTyped(
  Future<ElicitResult> Function(ElicitRequestParams request) handler,
) => inner.onElicitationRequestTyped(handler);