InputRequest extension type
A request an InputRequiredResult carries, written the way the schema writes it: the method name next to the request it applies to.
The schema names ElicitRequest, CreateMessageRequest and ListRootsRequest here and nothing else, so there is a constructor for each. Reading one back, dispatch on method and then read params as the matching type.
From the 2026-07-28 revision.
Constructors
- InputRequest.elicit(ElicitRequest request)
-
factory
-
InputRequest.fromMap(Map<
String, Object?> value) -
factory
- InputRequest.listRoots(ListRootsRequest request)
-
factory
- InputRequest.sample(CreateMessageRequest request)
-
factory
Properties
- isElicit → bool
-
Whether this carries an ElicitRequest.
no setter
- isListRoots → bool
-
Whether this carries a ListRootsRequest.
no setter
- isSample → bool
-
Whether this carries a CreateMessageRequest.
no setter
- method → String
-
The method this request is made under.
no setter
- params → Request?
-
The request itself, which method says how to read.
no setter
Constants
-
methodNames
→ const Set<
String> - The methods a request here may be made under.