DiscoverResult implements ResultInterface
The server's response to a `server/discover` request.
The modern era's replacement for InitializeResult: it reports every
version this server speaks rather than negotiating one, and each request
picks from that list.
Tags
Table of Contents
Interfaces
- ResultInterface
- Base class for all specific MCP result objects (the value of the 'result' field).
Properties
- $capabilities : ServerCapabilities
- $instructions : string|null
- $supportedVersions : array<string|int, mixed>
Methods
- __construct() : mixed
- jsonSerialize() : ServerCapabilities, instructions?: string}
- `resultType`, caching hints and serverInfo are wire vocabulary, stamped by {@see \Mcp\Server\Wire\Rev2026Codec} rather than modelled here.
Properties
$capabilities read-only
public
ServerCapabilities
$capabilities
$instructions read-only
public
string|null
$instructions
= null
$supportedVersions read-only
public
array<string|int, mixed>
$supportedVersions
Methods
__construct()
public
__construct(array<int, ProtocolVersion> $supportedVersions, ServerCapabilities $capabilities[, string|null $instructions = null ]) : mixed
Parameters
- $supportedVersions : array<int, ProtocolVersion>
-
every revision this server can answer
- $capabilities : ServerCapabilities
- $instructions : string|null = null
jsonSerialize()
`resultType`, caching hints and serverInfo are wire vocabulary, stamped by {@see \Mcp\Server\Wire\Rev2026Codec} rather than modelled here.
public
jsonSerialize() : ServerCapabilities, instructions?: string}