InputRequiredResult implements ResultInterface
Tells the client the server needs more input before it can finish (MRTR).
The modern era removed server-initiated requests, so the ask travels back in
the result and the client re-sends the original call with the answers. The
requestState round-trips through the client and is therefore
attacker-controlled on return — see RequestStateCodec.
Tags
Table of Contents
Interfaces
- ResultInterface
- Base class for all specific MCP result objects (the value of the 'result' field).
Constants
- RESULT_TYPE : mixed = 'input_required'
Properties
- $inputRequests : array<string|int, mixed>
- $requestState : string|null
Methods
- __construct() : mixed
-
jsonSerialize()
: array{resultType: string, inputRequests?: array
, requestState?: string}
Constants
RESULT_TYPE
public
mixed
RESULT_TYPE
= 'input_required'
Properties
$inputRequests read-only
public
array<string|int, mixed>
$inputRequests
= []
$requestState read-only
public
string|null
$requestState
= null
Methods
__construct()
public
__construct([array<string, ElicitRequest|CreateSamplingMessageRequest|ListRootsRequest> $inputRequests = [] ][, string|null $requestState = null ]) : mixed
Parameters
- $inputRequests : array<string, ElicitRequest|CreateSamplingMessageRequest|ListRootsRequest> = []
-
server-assigned keys, unique within this request
- $requestState : string|null = null
-
opaque server context the client echoes back
jsonSerialize()
public
jsonSerialize() : array{resultType: string, inputRequests?: array, requestState?: string}