MCP PHP SDK

ListPromptsResult implements ResultInterface

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

Tags
phpstan-import-type

PromptData from Prompt

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
$prompts  : array<string|int, mixed>

Methods

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

Properties

Methods

__construct()

public __construct(array<string|int, Prompt$prompts[, string|null $nextCursor = null ]) : mixed
Parameters
$prompts : array<string|int, Prompt>

the list of prompt 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(PromptData[], nextCursor?: string} $data) : self
Parameters
$data : PromptData[], nextCursor?: string}
Return values
self

jsonSerialize()

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

        
On this page

Search results