Versions in this module Expand all Collapse all v0 v0.1.0 Apr 15, 2025 Changes in this version + type Client struct + func New(name, version string, transport transport.Transport, options ...Option) *Client + func (c *Client) CallTool(ctx context.Context, params *schema.CallToolRequestParams) (*schema.CallToolResult, error) + func (c *Client) Complete(ctx context.Context, params *schema.CompleteRequestParams) (*schema.CompleteResult, error) + func (c *Client) GetPrompt(ctx context.Context, params *schema.GetPromptRequestParams) (*schema.GetPromptResult, error) + func (c *Client) Initialize(ctx context.Context) (*schema.InitializeResult, error) + func (c *Client) ListPrompts(ctx context.Context, cursor *string) (*schema.ListPromptsResult, error) + func (c *Client) ListResourceTemplates(ctx context.Context, cursor *string) (*schema.ListResourceTemplatesResult, error) + func (c *Client) ListResources(ctx context.Context, cursor *string) (*schema.ListResourcesResult, error) + func (c *Client) ListTools(ctx context.Context, cursor *string) (*schema.ListToolsResult, error) + func (c *Client) Ping(ctx context.Context, params *schema.PingRequestParams) (*schema.PingResult, error) + func (c *Client) ReadResource(ctx context.Context, params *schema.ReadResourceRequestParams) (*schema.ReadResourceResult, error) + func (c *Client) SetLevel(ctx context.Context, params *schema.SetLevelRequestParams) (*schema.SetLevelResult, error) + func (c *Client) Subscribe(ctx context.Context, params *schema.SubscribeRequestParams) (*schema.SubscribeResult, error) + func (c *Client) Unsubscribe(ctx context.Context, params *schema.UnsubscribeRequestParams) (*schema.UnsubscribeResult, error) + type Handler struct + func (h *Handler) CreateMessageRequest(ctx context.Context, request *jsonrpc.Request) (*schema.CreateMessageResult, *jsonrpc.Error) + func (h *Handler) ListRoots(ctx context.Context, request *jsonrpc.Request) (*schema.ListRootsResult, *jsonrpc.Error) + func (h *Handler) OnNotification(ctx context.Context, notification *jsonrpc.Notification) + func (h *Handler) Serve(ctx context.Context, request *jsonrpc.Request, response *jsonrpc.Response) + type Implementer interface + Implements func(method string) bool + OnNotification func(ctx context.Context, notification *jsonrpc.Notification) + type Operations interface + CreateMessage func(ctx context.Context, params *schema.CreateMessageRequestParams) (*schema.CreateMessageResult, *jsonrpc.Error) + ListRoots func(ctx context.Context, params *schema.ListRootsRequestParams) (*schema.ListRootsResult, *jsonrpc.Error) + type Option func(c *Client) + func WithCapabilities(capabilities schema.ClientCapabilities) Option + func WithMetadata(metadata map[string]any) Option