ServerCapabilities implements JsonSerializable
Capabilities that a server may support. Known capabilities are defined here, in this schema, but this is not a closed set: any server can define its own, additional capabilities.
Tags
Table of Contents
Interfaces
- JsonSerializable
Properties
- $completions : bool|null
- $experimental : array<string|int, mixed>|null
- $logging : bool|null
- $prompts : bool|null
- $promptsListChanged : bool|null
- $resources : bool|null
- $resourcesListChanged : bool|null
- $resourcesSubscribe : bool|null
- $tools : bool|null
- $toolsListChanged : bool|null
Methods
- __construct() : mixed
- fromArray() : self
- jsonSerialize() : array{logging?: object, completions?: object, prompts?: object, resources?: object, tools?: object, experimental?: object}
Properties
$completions read-only
public
bool|null
$completions
= false
$experimental read-only
public
array<string|int, mixed>|null
$experimental
= null
$logging read-only
public
bool|null
$logging
= false
$prompts read-only
public
bool|null
$prompts
= true
$promptsListChanged read-only
public
bool|null
$promptsListChanged
= false
$resources read-only
public
bool|null
$resources
= true
$resourcesListChanged read-only
public
bool|null
$resourcesListChanged
= false
$resourcesSubscribe read-only
public
bool|null
$resourcesSubscribe
= false
$tools read-only
public
bool|null
$tools
= true
$toolsListChanged read-only
public
bool|null
$toolsListChanged
= false
Methods
__construct()
public
__construct([bool|null $tools = true ][, bool|null $toolsListChanged = false ][, bool|null $resources = true ][, bool|null $resourcesSubscribe = false ][, bool|null $resourcesListChanged = false ][, bool|null $prompts = true ][, bool|null $promptsListChanged = false ][, bool|null $logging = false ][, bool|null $completions = false ][, array<string, mixed>|null $experimental = null ]) : mixed
Parameters
- $tools : bool|null = true
-
server exposes callable tools
- $toolsListChanged : bool|null = false
-
server supports list changed notifications for tools
- $resources : bool|null = true
-
server provides readable resources
- $resourcesSubscribe : bool|null = false
-
server supports subscribing to changes in the list of resources
- $resourcesListChanged : bool|null = false
-
server supports list changed notifications for resources
- $prompts : bool|null = true
-
server provides prompts templates
- $promptsListChanged : bool|null = false
-
server supports list changed notifications for prompts
- $logging : bool|null = false
-
server emits structured log messages
- $completions : bool|null = false
-
Server supports argument autocompletion
- $experimental : array<string, mixed>|null = null
-
experimental, non-standard features that the server supports
fromArray()
public
static fromArray(array{logging?: mixed, completions?: mixed, prompts?: array{listChanged?: bool}|object, resources?: array{listChanged?: bool, subscribe?: bool}|object, tools?: object|array{listChanged?: bool}, experimental?: array} $data) : self
Parameters
-
$data
: array{logging?: mixed, completions?: mixed, prompts?: array{listChanged?: bool}|object, resources?: array{listChanged?: bool, subscribe?: bool}|object, tools?: object|array{listChanged?: bool}, experimental?: array
}
Return values
selfjsonSerialize()
public
jsonSerialize() : array{logging?: object, completions?: object, prompts?: object, resources?: object, tools?: object, experimental?: object}