AI Agents Fancy Stable

ToolCall

One tool invocation in a disclosure card: status dot, tool name, duration, and the request and result payloads pretty-printed on expand

Preview

Installation

pnpm add fancy-ui-svelte
import { ToolCall } from 'fancy-ui-svelte'

Usage

svelte
<script lang="ts">
  import { ToolCall } from 'fancy-ui-svelte';
</script>

<ToolCall />

Examples

Basic Usage

Props

PropTypeDefaultDescription
call *ToolCallData-The invocation to render: id, name, status, and whatever payloads exist so far
open boolean-Expanded state (bindable). Left undefined the card stays collapsed, except that a call with status "error" opens itself — until the reader toggles it by hand
onToggle (open: boolean) => void-Called on every open/close, by click or on the card's own initiative

Slots

SlotDescription
inputReplaces the default request rendering; receives call.input
outputReplaces the default result rendering; receives call.output
iconLeading icon, replacing the default wrench