Documentation
¶
Index ¶
- type Factory
- type Session
- func (s *Session) CallTool(ctx context.Context, toolName string, args map[string]any) (*spec.InvokeMCPToolResponseBody, error)
- func (s *Session) Close(ctx context.Context) error
- func (s *Session) Complete(ctx context.Context, req spec.MCPCompleteArgumentRequestBody) (*spec.MCPCompletionResult, error)
- func (s *Session) Discover(ctx context.Context, serverID spec.MCPServerID, ...) (spec.MCPDiscoverySnapshot, error)
- func (s *Session) GetPrompt(ctx context.Context, name string, args map[string]string) (*spec.MCPGetPromptResponseBody, error)
- func (s *Session) Ping(ctx context.Context) error
- func (s *Session) ReadResource(ctx context.Context, uri string) (*spec.MCPReadResourceResponseBody, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Factory ¶
type Factory struct {
// contains filtered or unexported fields
}
func NewFactory ¶
func NewFactory() *Factory
func NewFactoryWithLogger ¶
func (*Factory) Connect ¶
func (f *Factory) Connect( ctx context.Context, cfg spec.MCPServerConfig, resolved auth.ResolvedTransportAuth, events runtime.ClientNotificationSink, ) (runtime.ClientSession, error)
type Session ¶
type Session struct {
// contains filtered or unexported fields
}
func (*Session) Complete ¶
func (s *Session) Complete( ctx context.Context, req spec.MCPCompleteArgumentRequestBody, ) (*spec.MCPCompletionResult, error)
func (*Session) Discover ¶
func (s *Session) Discover( ctx context.Context, serverID spec.MCPServerID, defaultPolicy spec.MCPServerPolicy, trustLevel spec.MCPTrustLevel, ) (spec.MCPDiscoverySnapshot, error)
func (*Session) ReadResource ¶
Click to show internal directories.
Click to hide internal directories.