Skip to content

ToolChunk

A tool call chunk from the LLM response stream.

---
title: ToolChunk
config:
  look: handDrawn
  theme: colorful
  class:
    hideEmptyMembersBox: true
---
classDiagram
    class StreamChunk {
      <<abstract>>
        +string kind
    }
    StreamChunk <|-- ToolChunk
    class ToolChunk {
        +string kind
        +ToolCall toolCall
    }
    class ToolCall {
        +string id
        +string name
        +string arguments
    }
    ToolChunk *-- ToolCall
toolCall:
id: call_abc123
name: get_weather
arguments: '{"city": "Paris"}'
NameTypeDescription
kindstringThe kind identifier for tool chunks
toolCallToolCallThe tool call data

The following types are composed within ToolChunk: