MCP PHP SDK

ListResourceTemplatesResult implements ResultInterface

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

Tags
phpstan-import-type

ResourceTemplateData from ResourceTemplate

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

$nextCursor  : string|null
$resourceTemplates  : array<string|int, mixed>

Methods

__construct()  : mixed
fromArray()  : self
jsonSerialize()  : ResourceTemplate[], nextCursor?: string}

Properties

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
self

jsonSerialize()

public jsonSerialize() : ResourceTemplate[], nextCursor?: string}
Return values
ResourceTemplate[], nextCursor?: string}

        
On this page

Search results