Tool config type (default: SDK ToolConfig)
Handler function type (default: ToolHandler)
Use without generics for SDK-typed tools:
ToolModuleToolModule[]Use with generics for middleware transformation:
ToolModule<ToolConfig, ToolHandler<TArgs, EnrichedExtra>>The bounds ensure compatibility with SDK registration. Tools are created via factory functions that inject dependencies via closure.
Note: Handler uses unknown by default to avoid contravariance issues when
specific handler types are inferred via satisfies pattern. The SDK validates
handlers at runtime.
Tool module interface with bounded generics.