ai.events.ToolCompleted
A tool's result: its output text, plus any media the tool produced (a screenshot from a computer-use tool, a rendered chart).
Reference version
Signature
class ai.events.ToolCompletedA tool's result: its output text, plus any media the tool produced (a screenshot from a computer-use tool, a rendered chart).
Source:<builtin>/ai/ns_events/events.bamlbytes 1820–2712
Fields
id
stringcontent
Static methods
function
new
(id: string, output: string) -> ai.events.ToolCompletedoutput is the tool's result serialized as JSON text.
function
of
(id: string,
items: (string | image | audio | video | pdf | ai.content.Text | ai.content.Media)[]
) -> ai.events.ToolCompleted
A result from ordinary values: text, the image / audio / video /
pdf primitives, or blocks already built (see root.content.blocks).
Instance methods
function
text
(self) -> stringThe Text blocks joined — the tool's text output; a media block
contributes a [image]-style placeholder.