MCP PHP SDK

ToolUseContent extends Content

FinalYes

A request from the assistant to call a tool.

since protocol revision 2026-07-28 (SEP-2577), earliest removal 2027-07-28. Integrate with an LLM provider's API directly instead.

Table of Contents

Properties

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

Methods

__construct()  : mixed
fromArray()  : self
jsonSerialize()  : |\stdClass, _meta?: array}">stdClass, _meta?: array}

Properties

$meta read-only

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

Methods

__construct()

public __construct(string $id, string $name, array<string, mixed> $input[, array<string, mixed>|null $meta = null ]) : mixed
Parameters
$id : string
$name : string
$input : array<string, mixed>
$meta : array<string, mixed>|null = null

fromArray()

public static fromArray(array{id?: mixed, name?: mixed, input?: mixed, _meta?: mixed} $data) : self
Parameters
$data : array{id?: mixed, name?: mixed, input?: mixed, _meta?: mixed}
Return values
self

jsonSerialize()

public jsonSerialize() : |\stdClass, _meta?: array}">stdClass, _meta?: array}
Return values
|\stdClass, _meta?: array}">stdClass, _meta?: array}
On this page

Search results