ToolCall
Markdown for agentsA component for displaying AI tool/function calls with status, arguments, and results.
npx slipstream-ui@latest add tool-callPlayground
search_databaseCompleted
tool-123Arguments
{
"query": "React components",
"limit": 10
}Result
{
"results": [
"Component A",
"Component B",
"Component C"
]
}Statuses
searchCompleted
1Arguments
{
"query": "React"
}Result
{
"results": [
"Component A",
"Component B"
]
}calculateRunning
2Arguments
{
"expression": "2 + 2"
}api_requestFailed
3Arguments
{
"endpoint": "/users"
}Result
{
"error": "Timeout"
}Props
| Prop | Type | Default | Description |
|---|---|---|---|
| toolCall | ToolCall | required | Tool call object with name, arguments, status |
| showResult | boolean | true | Whether to display the result |
Accessibility
- Status shown with both color and text label
- Arguments and results displayed in formatted code blocks
- Tool information organized in clear sections
- Status colors have sufficient contrast