Skip to content
Calm motion: animations on this site only fade, with no movement

Tool call ​

One step of an assistant, with its input and output

Shows a tool that an assistant uses while it works, for example a web search, and what the tool got and gave back. Put the steps in order between the prompt input and the streaming reply.

Basic
search_webpodcast episode titlesDone

Input

{
  "query": "podcast episode titles",
  "limit": 3
}

Output

[
  {
    "title": "How to name an episode",
    "url": "https://example.com/a"
  },
  {
    "title": "Titles that get clicks",
    "url": "https://example.com/b"
  }
]
fetch_pageexample.com/cFailed

Input

{
  "url": "https://example.com/c"
}

Output

Error 404: the page does not exist
write_draftthree titlesRunning

Input

{
  "count": 3
}
  • name is the name of the tool, and summary is a short line after it, for example the search words.
  • status is running (a spinner), done (a check), or error (a cross). The status is also a word, so it does not depend on color.
  • The step is closed by default. A click on the line opens it and shows input and output. It is a native <details>, so the keyboard and screen readers work with no script. v-model:open holds its state.
  • input and output can be a text, or data that shows as formatted JSON. Leave one out and its part is not shown. The input and output slots replace each part, for example with a code block.
  • Change the words with labels or a label pack: running, done, error, input, and output.

Usage ​

ts
import { BlessToolCall } from "blessing-ui";

API ​

Props

NameTypeDefaultDescription
name*string—the name of the tool, for example `search_web`
status"done" | "running" | "error""running"
summarystring—a short line after the name, for example the search words
inputunknown—the arguments: a text, or data that shows as JSON
outputunknown—the result or the error: a text, or data that shows as JSON
labelsPartial<{ running: string; done: string; error: string; input: string; output: string; }>—
openbooleanfalse

Events

NamePayloadDescription
update:open[value: boolean]

Slots

NameScopeDescription
input—
output—

Released under the MIT License. Character names and artwork belong to their owners.