Skip to main content
Create Tool records and pass them through AgentSdk.DefineTool(...). A tool can include:
  • JSON Parameters shown to the model
  • InputSchema, OutputSchema, and EventSchema validation delegates
  • a per-tool Timeout and asynchronous Execute delegate
  • unconditional or conditional approval
  • OnToolCalled and OnResponseReceived for interactive work
  • next-turn overrides and recoverable tool-error handling
Use RuntimeContext.EmitProgress for preliminary results, SetContext for application context, and CancellationToken for cancellation-aware dependencies. Independent tools can run concurrently through ToolExecutionConfig. Saved tool-result messages retain model call order even if execution finishes in a different order.
Last modified on July 26, 2026