ListResourcesResult implements ResultInterface
The server's response to a resources/list 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
- $nextCursor : string|null
- $resources : array<string|int, mixed>
Methods
- __construct() : mixed
- fromArray() : self
- jsonSerialize() : Resource[], nextCursor?: string}
Properties
$nextCursor read-only
public
string|null
$nextCursor
= null
$resources read-only
public
array<string|int, mixed>
$resources
Methods
__construct()
public
__construct(array<string|int, Resource> $resources[, string|null $nextCursor = null ]) : mixed
Parameters
- $resources : array<string|int, Resource>
-
the list of resource definitions
- $nextCursor : string|null = null
-
An opaque token representing the pagination position after the last returned result.
If present, there may be more results available.
fromArray()
public
static fromArray(ResourceData[], nextCursor?: string} $data) : self
Parameters
- $data : ResourceData[], nextCursor?: string}
Return values
selfjsonSerialize()
public
jsonSerialize() : Resource[], nextCursor?: string}