ToolCallProps
Defines the props for the ToolCall component.
ToolCall displays a tool or function invocation, its current state, and
optional details. It renders its own default Approve/Reject buttons whenever
state === 'awaitingApproval', firing onAction with the corresponding
action. approvalTemplate overrides this default rendering entirely.
Extends React.HTMLAttributes<HTMLDivElement> to allow passing standard HTML
attributes (e.g. className, style, id) directly to the root element.
Definition
Package:@progress/kendo-react-conversational-ui
Properties
approvalTemplate?
ComponentType<ToolCallApprovalTemplateProps>
A custom component that replaces the default approval explanation and actions.
Receives { state } via ToolCallApprovalTemplateProps.
approvalText?
string
Approval explanation shown in the default approval card when state = "awaitingApproval".
Override with approvalTemplate for custom rendering.
defaultExpanded?
boolean
Initial expanded state in uncontrolled mode. Ignored when expanded is provided.
false
errorTemplate?
ComponentType<ToolCallErrorTemplateProps>
A custom component that replaces the default error block content.
Receives { errorText } via ToolCallErrorTemplateProps.
errorText?
string
Error message. Rendered whenever provided.
Override with errorTemplate for custom rendering.
expandable?
boolean
Whether the head exposes disclosure behavior.
false
expanded?
boolean
Controls whether tool details are visible, in controlled mode.
label?
string
Tool or function name.
onAction?
(event: ToolCallActionEvent) => void
Callback fired when the user clicks the Approve or Reject button.
onExpandedChange?
(event: ToolCallExpandedChangeEvent) => void
Callback fired when the user toggles tool details.
parameters?
unknown
Raw tool input data — rendered as formatted JSON by default.
Override with paramsTemplate for custom rendering.
paramsTemplate?
ComponentType<ToolCallParamsTemplateProps>
A custom component that replaces the default parameters block content.
Receives { parameters } via ToolCallParamsTemplateProps.
result?
unknown
Raw tool result data — rendered as formatted JSON by default.
Override with resultTemplate for custom rendering.
resultTemplate?
ComponentType<ToolCallResultTemplateProps>
A custom component that replaces the default result block content.
Receives { result } via ToolCallResultTemplateProps.
secondaryLabel?
string
File, command, or target context. Include duration text here when needed.
Semantic lifecycle state.
"active"
svgIcon?
SVGIcon
Tool icon.
Pass an icon object from @progress/kendo-svg-icons.
wrenchIcon