ListResourceTemplatesResult implements ResultInterface
The server's response to a resources/templates/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
- $resourceTemplates : array<string|int, mixed>
Methods
- __construct() : mixed
- fromArray() : self
- jsonSerialize() : ResourceTemplate[], nextCursor?: string}
Properties
$nextCursor read-only
public
string|null
$nextCursor
= null
$resourceTemplates read-only
public
array<string|int, mixed>
$resourceTemplates
Methods
__construct()
public
__construct(array<string|int, ResourceTemplate> $resourceTemplates[, string|null $nextCursor = null ]) : mixed
Parameters
- $resourceTemplates : array<string|int, ResourceTemplate>
-
the list of resource template 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(ResourceTemplateData[], nextCursor?: string} $data) : self
Parameters
- $data : ResourceTemplateData[], nextCursor?: string}
Return values
selfjsonSerialize()
public
jsonSerialize() : ResourceTemplate[], nextCursor?: string}