Skip to content

Custom Tools

You can create tools in three main ways:

  1. Attribute-based methods with [Tool] and [ToolParam]
  2. Reflection helpers like Tool.FromType<T>() and Tool.FromMethod<T>()
  3. Fluent builder definitions with Tool.Create(...)

Tool handlers receive IToolContext, which is also how interactive tools can request user input when an IToolContextProvider is configured.

Real examples live in:

  • ToolsDemo
  • SdkShowcase
  • ProvidersDemo for manual ToolDefinition usage