Versions in this module Expand all Collapse all v0 v0.1.3 Sep 1, 2026 v0.1.2 Aug 31, 2026 Changes in this version + var ErrInvalidArguments = errors.New("tool: invalid arguments") + var ErrNotFound = errors.New("tool: tool not found") + func BooleanProperty(description string) map[string]any + func IntegerProperty(description string) map[string]any + func NumberProperty(description string) map[string]any + func Schema(description string, properties map[string]any, required ...string) map[string]any + func StringProperty(description string) map[string]any + type Call struct + Arguments json.RawMessage + ID string + Name string + type Definition struct + Description string + InputSchema map[string]any + Name string + type Executor struct + func NewExecutor(registry *Registry, opts ...ExecutorOption) *Executor + func (e *Executor) Execute(ctx context.Context, call Call) Result + type ExecutorOption func(*Executor) + func WithMiddlewares(ms ...Middleware) ExecutorOption + type Func struct + func NewFunc[In, Out any](name, description string, inputSchema map[string]any, ...) *Func[In, Out] + func (f *Func[In, Out]) Definition() Definition + func (f *Func[In, Out]) Execute(ctx context.Context, args json.RawMessage) (any, error) + type Middleware func(next Next) Next + func Logging(logf func(format string, args ...any)) Middleware + func Recover() Middleware + func Timeout(d time.Duration) Middleware + type Next func(ctx context.Context, call Call) (any, error) + type Registry struct + func NewRegistry() *Registry + func NewRegistryWith(tools ...Tool) *Registry + func (r *Registry) Get(name string) (Tool, bool) + func (r *Registry) Has(name string) bool + func (r *Registry) List() []Definition + func (r *Registry) Names() []string + func (r *Registry) Register(t Tool) + type Result struct + Content string + Data any + Err error + IsError bool + func Failure(err error) Result + func Success(data any) Result + type Tool interface + Definition func() Definition + Execute func(ctx context.Context, args json.RawMessage) (any, error)