Versions in this module Expand all Collapse all v0 v0.4.3 Mar 14, 2026 Changes in this version + const BuiltinNamespace + const UserConnectorURI + const UserNamespace + var ReservedNames = []string + var ReservedNamespaces = []string + func New(opts ...Option) (*toolkit, error) + func WithSession(ctx context.Context, id string, meta ...schema.MetaValue) context.Context + type ConnectorEvent struct + Connector llm.Connector + Kind ConnectorEventKind + State schema.ConnectorState + URI string + func PromptListChangeEvent() ConnectorEvent + func ResourceListChangeEvent() ConnectorEvent + func ResourceUpdatedEvent(uri string) ConnectorEvent + func StateChangeEvent(state schema.ConnectorState) ConnectorEvent + func ToolListChangeEvent() ConnectorEvent + type ConnectorEventKind int + const ConnectorEventPromptListChanged + const ConnectorEventResourceListChanged + const ConnectorEventResourceUpdated + const ConnectorEventStateChange + const ConnectorEventToolListChanged + type ListRequest struct + Limit *uint + Name string + Namespace string + Offset uint + Type ListType + type ListResponse struct + Count uint + Limit *uint + Offset uint + Prompts []llm.Prompt + Resources []llm.Resource + Tools []llm.Tool + type ListType string + const ListTypePrompts + const ListTypeResources + const ListTypeTools + type Option func(*toolkit) error + func WithDelegate(h ToolkitDelegate) Option + func WithLogger(l *slog.Logger) Option + func WithPrompt(items ...llm.Prompt) Option + func WithResource(items ...llm.Resource) Option + func WithTool(items ...llm.Tool) Option + func WithTracer(t trace.Tracer) Option + type Session interface + Capabilities func() *mcp.ClientCapabilities + ClientInfo func() *mcp.Implementation + ID func() string + Logger func() *slog.Logger + Meta func() map[string]any + Progress func(progress, total float64, message ...string) error + func SessionFromContext(ctx context.Context) Session + type Toolkit interface + AddConnector func(string) error + AddConnectorNS func(namespace, url string) error + AddPrompt func(...llm.Prompt) error + AddResource func(...llm.Resource) error + AddTool func(...llm.Tool) error + Call func(context.Context, any, ...llm.Resource) (llm.Resource, error) + List func(context.Context, ListRequest) (*ListResponse, error) + Lookup func(context.Context, string) (any, error) + RemoveBuiltin func(string) error + RemoveConnector func(string) error + Run func(context.Context) error + type ToolkitDelegate interface + Call func(context.Context, llm.Prompt, ...llm.Resource) (llm.Resource, error) + CreateConnector func(url string, onEvent func(ConnectorEvent)) (llm.Connector, error) + OnEvent func(ConnectorEvent)