class CallTool implements Method, MirrorsParameters

Methods

__construct(string $name, array $arguments = [], MirroredParameters|null $mirroredParameters = null)

Create a tool call request.

array
requestHeaders()

Get the headers mirroring tool arguments.

string
method()

Get the tool call method name.

array
params()

Get the tool name and arguments.

TResult
handle(Protocol $protocol)

Call the tool and hydrate its result.

Details

at line 23
__construct(string $name, array $arguments = [], MirroredParameters|null $mirroredParameters = null)

Create a tool call request.

Parameters

string $name
array $arguments
MirroredParameters|null $mirroredParameters

at line 35
array requestHeaders()

Get the headers mirroring tool arguments.

Return Value

array

at line 43
string method()

Get the tool call method name.

Return Value

string

at line 53
array params()

Get the tool name and arguments.

Return Value

array

at line 64
TResult handle(Protocol $protocol)

Call the tool and hydrate its result.

Parameters

Protocol $protocol

Return Value

TResult