Create Tool values and pass them through DefineTool(...). Tools can include:
- JSON
Parameters shown to the model
InputSchema, OutputSchema, and EventSchema validators
- a
Timeout and Execute(input, RuntimeContext) function
- unconditional
RequireApproval or a conditional Approval predicate
OnToolCalled and OnResponseReceived for interactive work
NextTurn overrides and OnError: "return-to-model"
Use RuntimeContext.EmitProgress, SetContext, and the supplied context.Context. ToolExecutionConfig{Concurrency: ...} runs independent tools concurrently while preserving tool-result order.
Last modified on July 26, 2026