Skip to main content

LogSpanToolContent

Content type for tool and API invocation spans.

Overview

LogSpanToolContent captures external tool calls and API invocations. It is wrapped in a LogSpanContent union via the actual_instance pattern.

Fields

type
str
required
Must be "Tool".
input
str
required
The input payload as a JSON string. Must be valid, parseable JSON (the result of json.dumps()).
output
str
required
The output payload as a JSON string. Must be valid, parseable JSON (the result of json.dumps()).

Construction Pattern

All span content is wrapped in LogSpanContent using the actual_instance parameter:

Example