MCP PHP SDK

ListRootsResult implements ResultInterface

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

This result contains an array of Root objects, each representing a root directory or file that the server can operate on.

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

$meta  : array<string|int, mixed>|null
$roots  : array<string|int, mixed>

Methods

__construct()  : mixed
jsonSerialize()  : Root[], _meta?: ?array}

Properties

Methods

__construct()

public __construct(array<string|int, Root$roots[, array<string, mixed>|null $meta = null ]) : mixed
Parameters
$roots : array<string|int, Root>

an array of root URIs

$meta : array<string, mixed>|null = null

optional metadata about the result

jsonSerialize()

public jsonSerialize() : Root[], _meta?: ?array}
Return values
Root[], _meta?: ?array}

        
On this page

Search results