MCP PHP SDK

CompletionCompleteResult implements ResultInterface

The server's response to a completion/complete request.

Tags
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

$hasMore  : bool|null
$total  : int|null
$values  : array<string|int, mixed>

Methods

__construct()  : mixed
jsonSerialize()  : array{completion: array{values: string[], total?: int, hasMore?: bool}}

Properties

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}}
Return values
array{completion: array{values: string[], total?: int, hasMore?: bool}}

        
On this page

Search results