ListToolsResult implements ResultInterface
The server's response to a tools/list request from the client.
Tags
Table of Contents
Interfaces
- ResultInterface
- Base class for all specific MCP result objects (the value of the 'result' field).
Properties
- $nextCursor : string|null
- $tools : array<string|int, mixed>
Methods
- __construct() : mixed
- fromArray() : self
- jsonSerialize() : Tool[], nextCursor?: string}
Properties
$nextCursor read-only
public
string|null
$nextCursor
= null
$tools read-only
public
array<string|int, mixed>
$tools
Methods
__construct()
public
__construct(array<string|int, Tool> $tools[, string|null $nextCursor = null ]) : mixed
Parameters
- $tools : array<string|int, Tool>
-
the list of tool 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(ToolData[], nextCursor?: string} $data) : self
Parameters
- $data : ToolData[], nextCursor?: string}
Return values
selfjsonSerialize()
public
jsonSerialize() : Tool[], nextCursor?: string}