Components
Tool Call
A card showing an AI tool invocation — name, status, and collapsible JSON arguments and result.
php artisan blatui:add tool-call
Arguments
{
"location": "San Francisco, CA",
"units": "celsius"
}
Result
{
"temperature": 18,
"conditions": "Partly cloudy",
"humidity": "64%"
}
@php
$args = [
'location' => 'San Francisco, CA',
'units' => 'celsius',
];
$result = [
'temperature' => 18,
'conditions' => 'Partly cloudy',
'humidity' => '64%',
];
@endphp
<x-ui.tool-call
name="get_weather"
status="success"
:args="$args"
:result="$result"
class="w-full max-w-md"
/>
Error
Arguments
{
"path": "/etc/app/config.json",
"mode": "r"
}
Result
{
"error": "ENOENT",
"message": "No such file or directory: /etc/app/config.json"
}
@php
$args = [
'path' => '/etc/app/config.json',
'mode' => 'r',
];
$result = [
'error' => 'ENOENT',
'message' => 'No such file or directory: /etc/app/config.json',
];
@endphp
<x-ui.tool-call
name="read_file"
status="error"
:args="$args"
:result="$result"
:open="true"
class="w-full max-w-md"
/>
Running
Arguments
{
"query": "SELECT * FROM orders WHERE status = ? LIMIT 50",
"bindings": [
"pending"
]
}
@php
$args = [
'query' => 'SELECT * FROM orders WHERE status = ? LIMIT 50',
'bindings' => ['pending'],
];
@endphp
<x-ui.tool-call
name="run_query"
status="running"
:args="$args"
:open="true"
class="w-full max-w-md"
/>
API Reference
Props, slots and exposed methods for
<x-ui.tool-call>.
Props
| Prop | Type | Default | Description |
|---|---|---|---|
name |
string
|
'tool'
|
The tool name shown in the header, rendered in a monospace font. |
status |
string
|
'success'
|
Execution state. Drives the header icon and label; an invalid value falls back to success.
pending
running
success
error
|
args |
string|array
|
— | The arguments passed to the tool. Arrays/objects are pretty-printed as JSON; other values are cast to string. |
result |
string|array
|
— | The tool result. Arrays/objects are pretty-printed as JSON; other values are cast to string. Rendered in red when status is error. |
open |
bool
|
false
|
Whether the arguments/result body is expanded on first render. |
id |
string
|
— | Optional identifier emitted as a data-tool-id attribute on the trigger for targeting from scripts. |