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
Table of Contents
Interfaces
- ResultInterface
- Base class for all specific MCP result objects (the value of the 'result' field).
Properties
Methods
- __construct() : mixed
-
jsonSerialize()
: Root[], _meta?: ?array
}
Properties
$meta read-only
public
array<string|int, mixed>|null
$meta
= null
$roots read-only
public
array<string|int, mixed>
$roots
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}