Documentation
¶
Index ¶
- func Waiter(id string) (chan *schema.ElicitResult, bool)
- type Client
- func (c *Client) CreateMessage(ctx context.Context, ...) (*schema.CreateMessageResult, *jsonrpc.Error)
- func (c *Client) Elicit(ctx context.Context, request *jsonrpc.TypedRequest[*schema.ElicitRequest]) (*schema.ElicitResult, *jsonrpc.Error)
- func (c *Client) Implements(method string) bool
- func (c *Client) Init(ctx context.Context, capabilities *schema.ClientCapabilities)
- func (*Client) LastRequestID() jsonrpc.RequestId
- func (c *Client) ListRoots(ctx context.Context, p *jsonrpc.TypedRequest[*schema.ListRootsRequest]) (*schema.ListRootsResult, *jsonrpc.Error)
- func (*Client) NextRequestID() jsonrpc.RequestId
- func (c *Client) Notify(ctx context.Context, notification *jsonrpc.Notification) error
- func (c *Client) OnNotification(ctx context.Context, notification *jsonrpc.Notification)
- func (c *Client) ProtocolVersion() string
- func (c *Client) SetConversationID(id string)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client adapts MCP operations to local execution.
func NewClient ¶
NewClient returns a ready client with explicit dependencies. - el: elicitation service (required) - conv: conversation client used for direct updates (required) - newAwaiter: factory for interactive prompts in CLI; pass nil for server mode - openURL: override URL opener; pass nil to use default or to disable
func (*Client) CreateMessage ¶
func (c *Client) CreateMessage(ctx context.Context, request *jsonrpc.TypedRequest[*schema.CreateMessageRequest]) (*schema.CreateMessageResult, *jsonrpc.Error)
func (*Client) Elicit ¶
func (c *Client) Elicit(ctx context.Context, request *jsonrpc.TypedRequest[*schema.ElicitRequest]) (*schema.ElicitResult, *jsonrpc.Error)
func (*Client) Implements ¶
Implements tells dispatcher which methods we support.
func (*Client) Init ¶
func (c *Client) Init(ctx context.Context, capabilities *schema.ClientCapabilities)
func (*Client) LastRequestID ¶
func (*Client) ListRoots ¶
func (c *Client) ListRoots(ctx context.Context, p *jsonrpc.TypedRequest[*schema.ListRootsRequest]) (*schema.ListRootsResult, *jsonrpc.Error)
func (*Client) NextRequestID ¶
func (*Client) OnNotification ¶
func (c *Client) OnNotification(ctx context.Context, notification *jsonrpc.Notification)
func (*Client) ProtocolVersion ¶
func (*Client) SetConversationID ¶ added in v0.2.0
SetConversationID assigns conversation id used for conv-scoped elicitation routing.
Click to show internal directories.
Click to hide internal directories.