InputRequiredResult extension type

Sent by a server in place of the result a request asked for, when it needs something from the client first.

The schema answers with one on tools/call, prompts/get and resources/read, and Result.resultType reads input_required on it. The client answers the inputRequests and then sends the original request again, with the answers and the requestState attached. That retry is a new request, so this result ends the exchange it belongs to.

The schema requires at least one of inputRequests and requestState, since a result carrying neither asks for nothing and hands back nothing to retry with. The unnamed constructor asserts it, and goes one step further by treating an empty inputRequests the same way. An empty map is valid on the wire and a server may mean something by it, and fromMap keeps whatever a server sent.

From the 2026-07-28 revision.

on
Implemented types

Constructors

InputRequiredResult({Map<String, InputRequest>? inputRequests, String? requestState, Meta? meta})
factory
InputRequiredResult.fromMap(Map<String, Object?> _value)

Properties

inputRequests → Map<String, InputRequest>?
The requests the server issued, keyed by the name the client answers each one under.
no setter
isInputRequired → bool
Whether the server asked for more input before it can answer, which makes this an InputRequiredResult.
no setterinherited
meta → Meta?
The _meta property/parameter is reserved by MCP to allow clients and servers to attach additional metadata to their interactions.
no setterinherited
requestState → String?
State the server wants back when the client retries the request.
no setter
resultType → String
The type of this result, which determines how to parse it.
no setterinherited