CompletionCompleteResult implements ResultInterface
The server's response to a completion/complete request.
Tags
Table of Contents
Interfaces
- ResultInterface
- Base class for all specific MCP result objects (the value of the 'result' field).
Properties
Methods
- __construct() : mixed
- jsonSerialize() : array{completion: array{values: string[], total?: int, hasMore?: bool}}
Properties
$hasMore read-only
public
bool|null
$hasMore
= null
$total read-only
public
int|null
$total
= null
$values read-only
public
array<string|int, mixed>
$values
Methods
__construct()
public
__construct(array<string|int, string> $values[, int|null $total = null ][, bool|null $hasMore = null ]) : mixed
Parameters
- $values : array<string|int, string>
-
An array of completion values. Must not exceed 100 items.
- $total : int|null = null
-
The total number of completion options available. This can exceed the number of values actually sent in the response.
- $hasMore : bool|null = null
-
indicates whether there are additional completion options beyond those provided in the current response, even if the exact total is unknown
jsonSerialize()
public
jsonSerialize() : array{completion: array{values: string[], total?: int, hasMore?: bool}}