MCP PHP SDK

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
author

Kyrian Obikwelu koshnawaza@gmail.com

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

$experimental read-only

public array<string|int, mixed>|null $experimental = null

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
self

jsonSerialize()

public jsonSerialize() : array{logging?: object, completions?: object, prompts?: object, resources?: object, tools?: object, experimental?: object}
Return values
array{logging?: object, completions?: object, prompts?: object, resources?: object, tools?: object, experimental?: object}

        
On this page

Search results