GetPromptResult implements ResultInterface
Tags
Table of Contents
Interfaces
- ResultInterface
- Base class for all specific MCP result objects (the value of the 'result' field).
Properties
- $description : string|null
- $messages : array<string|int, mixed>
Methods
- __construct() : mixed
- Create a new GetPromptResult.
- fromArray() : self
- jsonSerialize() : PromptMessage[], description?: string}
Properties
$description read-only
public
string|null
$description
= null
$messages read-only
public
array<string|int, mixed>
$messages
Methods
__construct()
Create a new GetPromptResult.
public
__construct(array<string|int, PromptMessage> $messages[, string|null $description = null ]) : mixed
Parameters
- $messages : array<string|int, PromptMessage>
-
The messages in the prompt
- $description : string|null = null
-
Optional description of the prompt
fromArray()
public
static fromArray(PromptMessageData[], description?: string} $data) : self
Parameters
- $data : PromptMessageData[], description?: string}
Return values
selfjsonSerialize()
public
jsonSerialize() : PromptMessage[], description?: string}