Module tools

Module tools 

Source
Expand description

Tool definitions, dispatch, toolsets, the confirmation flow, and frames.

Modules§

dispatcher
Tool dispatcher — routes function calls to the right tool implementation.
media
Tool media returns — the ADK pattern where a function response carries images or other media to the model alongside its JSON payload, so vision tools (screenshots, chart renderers, document croppers) feed the model something it can actually look at.
policy
Per-tool execution policy — timeout, caching, and confirmation.
simple
Simple function tool that wraps an async closure.
typed
Type-safe function tool with auto-generated JSON Schema.

Structs§

ActiveStreamingTool
Handle to a running streaming tool.
ConfirmationRequest
A request for confirmation of a sensitive tool call, handed to a ConfirmationProvider before the tool executes.
FrameSpec
The slot definition of a frame — the source of truth for what a stage that collects this frame must gather, plus the metadata that drives confirmation and repair.
PolicyTool
A ToolFunction decorator that enforces a ToolPolicy.
RecordExtractor
A TurnExtractor that runs an Extract record’s recognizers and resolvers, and promotes the recognized fields into state.
SimpleTool
Simple function tool that wraps an async closure.
SlotSpec
Metadata for a single slot within a FrameSpec.
StaticConfirmation
A ConfirmationProvider that approves or denies every request uniformly — handy for tests and “deny-all” / “allow-all” defaults.
StaticToolset
A simple toolset backed by a fixed list of tools.
ToolConfirmation
Represents a user’s confirmation decision for a tool call.
ToolDispatcher
Routes function calls to the right tool implementation.
ToolPolicy
Optional per-tool execution policy.
TypedTool
Type-safe function tool with auto-generated JSON Schema.

Enums§

ConfirmPolicy
When a slot’s value should be confirmed back to the user before it is trusted.
Recognizer
A deterministic transcript recognizer: text -> (value, confidence).
SlotRecognizer
A serializable description of the deterministic recognizer that fills a slot.
SlotValidator
A serializable validator applied to a recognized slot value; a value failing it is rejected (the slot stays unfilled until a valid value is recognized).
ToolClass
Classification of a registered tool.
ToolKind
Unified tool storage.

Traits§

ConfirmationProvider
Decides whether a confirmation-gated tool call may proceed.
InputStreamingTool
An input-streaming tool — receives duplicated live input while running.
StreamingTool
A streaming tool — runs in background, yields multiple results.
ToolFunction
A regular tool — called once, returns a result.
Toolset
A collection of tools that can be enumerated.