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
$id read-only
public
string
$id
$input read-only
public
array<string|int, mixed>
$input
$meta read-only
public
array<string|int, mixed>|null
$meta
= null
$name read-only
public
string
$name
$type read-only
public
string
$type
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
selfjsonSerialize()
public
jsonSerialize() : |\stdClass, _meta?: array}">stdClass, _meta?: array}