MCP PHP SDK

DiscoverRequest extends Request

FinalYes

Asks a server what it is and what it speaks (SEP-2575).

The modern era's optional replacement for initialize: it reports rather than negotiates, so a client MAY call it to learn the server's capabilities up front, and MAY skip it and simply declare a revision on each request.

Tags
see
DiscoverResult
author

Christopher Hertel mail@christopher-hertel.de

Table of Contents

Properties

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

Methods

fromArray()  : static
getId()  : string|int
getMeta()  : array<string, mixed>|null
getMethod()  : string
jsonSerialize()  : RequestData
withId()  : static
withMeta()  : static
fromParams()  : static
getParams()  : array<non-empty-string, mixed>|null

Properties

$meta

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

Methods

fromArray()

public static fromArray(RequestData $data) : static
Parameters
$data : RequestData
Return values
static

getId()

public getId() : string|int
Return values
string|int

getMeta()

public getMeta() : array<string, mixed>|null
Return values
array<string, mixed>|null

jsonSerialize()

public jsonSerialize() : RequestData
Return values
RequestData

withId()

public withId(string|int $id) : static
Parameters
$id : string|int
Return values
static

withMeta()

public withMeta(array<string, mixed>|null $meta) : static
Parameters
$meta : array<string, mixed>|null
Return values
static

fromParams()

protected static fromParams(array<string|int, mixed>|null $params) : static
Parameters
$params : array<string|int, mixed>|null
Return values
static

getParams()

protected getParams() : array<non-empty-string, mixed>|null
Return values
array<non-empty-string, mixed>|null
On this page

Search results