Tool call card

도구 호출 카드

A collapsible card showing which function or API the model is calling, with what arguments, while it runs.

Also known as: Function call UIAction card
···
html
<div class="card" id="card">
  <div class="row">
    <span class="badge run" id="st"><i class="spin"></i>실행 중</span>
    <code class="fn">search_web(<span id="arg">"2025 GPU 벤치마크"</span>)</code>
  </div>
  <div class="res" id="res"></div>
</div>
css
.card{width:min(310px,96%);border:1px solid var(--line);border-radius:11px;background:var(--surface);padding:10px 12px;display:grid;gap:8px}
.row{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.badge{display:inline-flex;align-items:center;gap:5px;font-size:10px;font-weight:700;padding:3px 8px;border-radius:999px}
.badge.run{background:color-mix(in srgb, var(--accent) 16%, transparent);color:var(--accent)}
.badge.done{background:color-mix(in srgb, var(--accent-3) 18%, transparent);color:#0f9d78}
.spin{width:8px;height:8px;border-radius:50%;border:1.5px solid currentColor;border-top-color:transparent;animation:sp .6s linear infinite;display:inline-block}
@keyframes sp{to{transform:rotate(360deg)}}
.fn{font-family:ui-monospace,monospace;font-size:11px;color:var(--fg)}
.res{font-size:11px;color:var(--muted);line-height:1.55;opacity:0;max-height:0;overflow:hidden;transition:opacity .25s}
.res[data-show]{opacity:1;max-height:60px}
js
const st = document.getElementById('st'), res = document.getElementById('res');
function run() {
  st.className = 'badge run';
  st.innerHTML = '<i class="spin"></i>실행 중';
  res.removeAttribute('data-show');
  res.textContent = '';
  setTimeout(() => {
    st.className = 'badge done';
    st.innerHTML = '완료';
    res.textContent = '결과 8건 — 상위 3개 벤치마크 기사 확인함';
    res.setAttribute('data-show', '');
  }, 1500);
}
run();
setInterval(run, 3400);

Agentic products often don't answer straight away — they call a tool (search, a calculator, a database lookup) and fold the result into the answer. Rather than streaming that step as a raw log, this card summarizes it in one line: the function name and its key arguments — "here's what's happening right now."

Status typically has three stages: running (spinner), done (checkmark, one-line result summary), and failed (warning icon, what went wrong). Expanding the card reveals the full arguments and return value, but it starts collapsed by default so it doesn't clutter the conversation.

If you're exposing raw arguments, filter them server-side first so API keys or personal data can't leak through — printing the literal request for debugging convenience is also a path for sensitive data to end up on screen.

When to use

Use it wherever there is function calling or agent tool use. Not needed for a conversation that is pure text generation.