MCP PHP SDK

Annotations implements JsonSerializable

Optional annotations for the client. The client can use annotations to inform how objects are used or displayed.

Tags
author

Kyrian Obikwelu koshnawaza@gmail.com

Table of Contents

Interfaces

JsonSerializable

Properties

$audience  : array<string|int, mixed>|null
$priority  : float|null

Methods

__construct()  : mixed
fromArray()  : self
jsonSerialize()  : AnnotationsData

Properties

$audience read-only

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

$priority read-only

public float|null $priority = null

Methods

__construct()

public __construct([array<string|int, Role>|null $audience = null ][, float|null $priority = null ]) : mixed
Parameters
$audience : array<string|int, Role>|null = null

Describes who the intended customer of this object or data is.

It can include multiple entries to indicate content useful for multiple audiences (e.g., [Role::User, Role::Assistant]).

$priority : float|null = null

Describes how important this data is for operating the server.

A value of 1 means "most important," and indicates that the data is effectively required, while 0 means "least important," and indicates that the data is entirely optional.

fromArray()

public static fromArray(AnnotationsData $data) : self
Parameters
$data : AnnotationsData
Return values
self

jsonSerialize()

public jsonSerialize() : AnnotationsData
Return values
AnnotationsData

        
On this page

Search results