MCP PHP SDK

ReadResourceResult implements ResultInterface

The server's response to a resources/read request from the client.

Tags
phpstan-import-type

TextResourceContentsData from TextResourceContents

phpstan-import-type

BlobResourceContentsData from BlobResourceContents

author

Kyrian Obikwelu koshnawaza@gmail.com

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

Methods

fromArray()

public static fromArray(BlobResourceContentsData)[]} $data) : self
Parameters
$data : BlobResourceContentsData)[]}
Return values
self

jsonSerialize()

public jsonSerialize() : TextResourceContents)[]}
Return values
TextResourceContents)[]}

        
On this page

Search results