MCP PHP SDK

ToolAnnotations implements JsonSerializable

Additional properties describing a Tool to clients.

NOTE: all properties in ToolAnnotations are hints.

Tags
author

Kyrian Obikwelu koshnawaza@gmail.com

Table of Contents

Interfaces

JsonSerializable

Properties

$destructiveHint  : bool|null
$idempotentHint  : bool|null
$openWorldHint  : bool|null
$readOnlyHint  : bool|null
$title  : string|null

Methods

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

Properties

Methods

__construct()

public __construct([string|null $title = null ][, bool|null $readOnlyHint = null ][, bool|null $destructiveHint = null ][, bool|null $idempotentHint = null ][, bool|null $openWorldHint = null ]) : mixed
Parameters
$title : string|null = null

a human-readable title for the tool

$readOnlyHint : bool|null = null

if true, the tool does not modify its environment

$destructiveHint : bool|null = null

If true, the tool may perform destructive updates to its environment. If false, the tool performs only additive updates.

$idempotentHint : bool|null = null

If true, calling the tool repeatedly with the same arguments will have no additional effect on the its environment. (This property is meaningful only when readOnlyHint == false)

$openWorldHint : bool|null = null

If true, this tool may interact with an "open world" of external entities. If false, the tool's domain of interaction is closed. For example, the world of a web search tool is open, whereas that of a memory tool is not.

fromArray()

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

jsonSerialize()

public jsonSerialize() : ToolAnnotationsData
Return values
ToolAnnotationsData

        
On this page

Search results