MCP PHP SDK

ListToolsResult implements ResultInterface

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

Tags
phpstan-import-type

ToolData from Tool

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

Methods

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

Properties

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
self

jsonSerialize()

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

        
On this page

Search results