ReadResourceResult implements ResultInterface
The server's response to a resources/read request from the client.
Tags
Table of Contents
Interfaces
- ResultInterface
- Base class for all specific MCP result objects (the value of the 'result' field).
Properties
- $contents : array<string|int, mixed>
Methods
- __construct() : mixed
- Create a new ReadResourceResult.
- fromArray() : self
- jsonSerialize() : TextResourceContents)[]}
Properties
$contents read-only
public
array<string|int, mixed>
$contents
Methods
__construct()
Create a new ReadResourceResult.
public
__construct(array<string|int, ResourceContents> $contents) : mixed
Parameters
- $contents : array<string|int, ResourceContents>
-
The contents of the resource
fromArray()
public
static fromArray(BlobResourceContentsData)[]} $data) : self
Parameters
- $data : BlobResourceContentsData)[]}
Return values
selfjsonSerialize()
public
jsonSerialize() : TextResourceContents)[]}