Tool
The Tool component displays a collapsible interface for showing and hiding tool details from AI SDK tool parts.
Tool Components Example
Installation
If you prefer using jsrepo, please install via the command below:
Props
Tool
| Name | Type | Default |
|---|---|---|
class | string | |
children | Snippet | |
...restProps | CollapsibleProps | |
ToolHeader
| Name | Type | Default |
|---|---|---|
type | string | |
state | 'input-streaming' | 'input-available' | 'output-available' | 'output-error' | |
class | string | |
...restProps | CollapsibleTriggerProps | |
ToolInput
| Name | Type | Default |
|---|---|---|
input | any | |
class | string | |
...restProps | HTMLAttributes<HTMLDivElement> | |
ToolOutput
| Name | Type | Default |
|---|---|---|
output | any | |
errorText | string | |
class | string | |
children | Snippet | |
...restProps | HTMLAttributes<HTMLDivElement> | |
ToolContent
| Name | Type | Default |
|---|---|---|
class | string | |
children | Snippet | |
...restProps | CollapsibleContentProps | |