Documentation
¶
Index ¶
- type CallOptions
- type ListToolsOptions
- type ListToolsResult
- type Options
- type SampleCallOptions
- type Sampler
- type Service
- func (s *Service) AddServer(name string, factory func(name string) mcp.MessageHandler)
- func (s *Service) BuildToolMappings(ctx context.Context, toolList []string, opts ...types.BuildToolMappingsOptions) (types.ToolMappings, error)
- func (s *Service) Call(ctx context.Context, server, tool string, args any, opts ...CallOptions) (ret *types.CallResult, err error)
- func (s *Service) GetAgentAttributes(_ context.Context, name string) (agentConfigName string, agentAttribute map[string]any, _ error)
- func (s *Service) GetClient(ctx context.Context, name string) (*mcp.Client, error)
- func (s *Service) GetDynamicInstruction(ctx context.Context, instruction types.DynamicInstructions) (string, error)
- func (s *Service) GetPrompt(ctx context.Context, target, prompt string, args map[string]string) (*mcp.GetPromptResult, error)
- func (s *Service) ListTools(ctx context.Context, opts ...ListToolsOptions) (result []ListToolsResult, _ error)
- func (s *Service) RunHook(ctx context.Context, in, out any, target string) (hasOutput bool, _ error)
- func (s *Service) SetSampler(sampler Sampler)
- type ToolCallInvocation
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CallOptions ¶
type CallOptions struct {
ProgressToken any
LogData map[string]any
ReturnInput bool
ReturnOutput bool
Target any
ToolCallInvocation *ToolCallInvocation
Meta map[string]any
}
func (CallOptions) Merge ¶
func (o CallOptions) Merge(other CallOptions) (result CallOptions)
type ListToolsOptions ¶
type ListToolsResult ¶
type Options ¶ added in v0.0.6
type SampleCallOptions ¶
type SampleCallOptions struct {
ProgressToken any
}
func (SampleCallOptions) Merge ¶
func (s SampleCallOptions) Merge(other SampleCallOptions) (result SampleCallOptions)
type Sampler ¶
type Sampler interface {
Sample(ctx context.Context, sampling mcp.CreateMessageRequest, opts ...sampling.SamplerOptions) (*types.CallResult, error)
}
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func NewToolsService ¶
func (*Service) AddServer ¶ added in v0.0.6
func (s *Service) AddServer(name string, factory func(name string) mcp.MessageHandler)
func (*Service) BuildToolMappings ¶
func (s *Service) BuildToolMappings(ctx context.Context, toolList []string, opts ...types.BuildToolMappingsOptions) (types.ToolMappings, error)
func (*Service) Call ¶
func (s *Service) Call(ctx context.Context, server, tool string, args any, opts ...CallOptions) (ret *types.CallResult, err error)
func (*Service) GetAgentAttributes ¶ added in v0.0.46
func (*Service) GetDynamicInstruction ¶
func (*Service) ListTools ¶
func (s *Service) ListTools(ctx context.Context, opts ...ListToolsOptions) (result []ListToolsResult, _ error)
func (*Service) SetSampler ¶
Click to show internal directories.
Click to hide internal directories.