A tool result is the structured record produced after a tool processes a tool call. It carries the originating call identifier, tool name, execution status, and returned content, including failure information when execution does not succeed. section 4.3.1
A tool result participates in an execution loop:
- The model emits a tool call containing a name, identifier, and arguments. section 3.2.1 section 4.3.1
- The host system parses the arguments, invokes the selected function, and captures its output or failure. section 3.2.1 section 4.3.1
- The host associates the result with the original call through tool_call_id, allowing parallel executions to remain distinguishable. section 4.3.1
- The result can be appended as a tool-role message so the model can interpret raw output and continue reasoning. section 3.2.1
Calculator result
For a multiplication call with arguments 1234 and 5678, the host executes the calculator and records content as 7006652. It then appends a tool message with the matching call identifier; the model turns that raw value into “1234 × 5678 = 7,006,652.” section 3.2.1
Listing 4.2 Content types for agent communication
class Message(BaseModel):
"""A text message in the conversation."""
type: Literal["message"] = "message"
role: Literal["system", "user", "assistant"]
content: str
class ToolCall(BaseModel):
"""LLM's request to execute a tool."""
type: Literal["tool_call"] = "tool_call"
tool_call_id: str
name: str
arguments: dict
class ToolResult(BaseModel):
"""Result from tool execution."""
type: Literal["tool_result"] = "tool_result"
tool_call_id: str
name: str
status: Literal["success", "error"]
content: list
ContentItem = Union[Message, ToolCall, ToolResult]
Use the typed content definitions to inspect how ToolResult differs from Message and ToolCall and how a discriminator identifies each kind. section 4.3.1
Wrapping tool results in execution events adds authorship, timestamps, and an execution_id, turning individual results into an auditable trace for debugging. section 4.3.1

