Skip to content

ToolDispatchResult

The result of dispatching a single tool call. Pairs the tool call identifier with the tool’s name and result for correlation in the agent loop’s message assembly.

---
title: ToolDispatchResult
config:
  look: handDrawn
  theme: colorful
  class:
    hideEmptyMembersBox: true
---
classDiagram
    class ToolDispatchResult {
        +string toolCallId
        +string name
        +ToolResult result
    }
    class ToolResult {
        +ContentPart[] parts
        +text() string [async-capable]
    }
    ToolDispatchResult *-- ToolResult
toolCallId: call_abc123
name: get_weather
result:
parts:
- kind: text
value: 72°F and sunny
NameTypeDescription
toolCallIdstringThe tool call ID from the LLM response, used to correlate results
namestringThe name of the tool that was called
resultToolResultThe result produced by the tool handler

The following types are composed within ToolDispatchResult: