tool

package
v0.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 26, 2025 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Registry

type Registry struct {
	// contains filtered or unexported fields
}

Registry bridges an individual fluxor-mcp Service instance to the generic tool.Registry interface so that callers can choose dependency injection over the global SetMCPService() singleton.

func New

func New(svc *mcpservice.Service, mgr *manager.Manager) (*Registry, error)

New creates a registry bound to the given orchestration service. The pointer must not be nil.

func (*Registry) Definitions

func (r *Registry) Definitions() []llm.ToolDefinition

func (*Registry) Execute

func (r *Registry) Execute(ctx context.Context, name string, args map[string]interface{}) (string, error)

func (*Registry) GetDefinition

func (r *Registry) GetDefinition(name string) (*llm.ToolDefinition, bool)

func (*Registry) InjectVirtualAgentTools

func (r *Registry) InjectVirtualAgentTools(agents []*agent.Agent, domain string)

InjectVirtualAgentTools registers synthetic tool definitions that delegate execution to another agent. It must be called once during bootstrap *after* the agent catalogue is loaded. Domain can be empty to expose all.

func (*Registry) MatchDefinition

func (r *Registry) MatchDefinition(pattern string) []*llm.ToolDefinition

func (*Registry) MustHaveTools

func (r *Registry) MustHaveTools(patterns []string) ([]llm.Tool, error)

func (*Registry) SetDebugLogger

func (r *Registry) SetDebugLogger(w io.Writer)

func (*Registry) WithManager added in v0.2.0

func (r *Registry) WithManager(m *manager.Manager) *Registry

WithManager attaches a per-conversation MCP manager used to inject the appropriate client and auth token into the context at call-time.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL