Table of Contents

Class InputRequiredResult

Namespace
ModelContextProtocol.Protocol
Assembly
ModelContextProtocol.Core.dll

Represents an input-required result sent by the server to indicate that additional input is needed before the request can be completed.

public sealed class InputRequiredResult : Result
Inheritance
InputRequiredResult
Inherited Members

Remarks

An InputRequiredResult is returned in response to a client-initiated request when the server needs the client to fulfill one or more server-initiated requests before it can produce a final result. Per SEP-2322 the wire format is valid for ToolsCall, PromptsGet, and resources/read; this SDK wires the MRTR interceptor into all three methods.

At least one of InputRequests or RequestState must be present.

This type is part of the Multi Round-Trip Requests (MRTR) mechanism defined in SEP-2322.

Constructors

InputRequiredResult()

Initializes a new instance of the InputRequiredResult class.

public InputRequiredResult()

Properties

InputRequests

Gets or sets the server-initiated requests that the client must fulfill before retrying the original request.

[JsonPropertyName("inputRequests")]
public IDictionary<string, InputRequest>? InputRequests { get; set; }

Property Value

IDictionary<string, InputRequest>

Remarks

The keys are server-assigned identifiers. The client must include a response for each key in the InputResponses map when retrying the original request.

RequestState

Gets or sets opaque state to be echoed back by the client when retrying the original request.

[JsonPropertyName("requestState")]
public string? RequestState { get; set; }

Property Value

string

Remarks

The client must treat this as an opaque blob and must not inspect, parse, modify, or make any assumptions about the contents. If present, the client must include this value in the RequestState property when retrying the original request.

Servers may encode request state in any format (e.g., plain JSON, base64-encoded JSON, encrypted JWT, serialized binary). If the state contains sensitive data, servers should encrypt it to ensure confidentiality and integrity.