Documentation
¶
Index ¶
- type BatchRequest
- type BatchResponse
- type WebSocketClient
- func (c *WebSocketClient) Close() error
- func (c *WebSocketClient) ExecuteTool(ctx context.Context, toolCall types.ToolCall) (*types.ToolResult, error)
- func (c *WebSocketClient) Initialize(ctx context.Context) error
- func (c *WebSocketClient) ListTools(ctx context.Context) ([]types.Tool, error)
- func (c *WebSocketClient) SendBatchRequest(ctx context.Context, requests []BatchRequest) ([]BatchResponse, error)
- func (c *WebSocketClient) SendRequest(ctx context.Context, method string, params interface{}) (*types.Response, error)
- func (c *WebSocketClient) SetInitializeParams(params *types.InitializeParams)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BatchRequest ¶
type BatchRequest struct { Method string Params interface{} }
BatchRequest represents a single request in a batch
type BatchResponse ¶
type BatchResponse struct { Result json.RawMessage Error *types.MCPError }
BatchResponse represents a single response in a batch
type WebSocketClient ¶
type WebSocketClient struct { transport.BaseTransport *client.BaseClient // contains filtered or unexported fields }
WebSocketClient implements a WebSocket-based MCP client
func NewWebSocketClient ¶
func NewWebSocketClient(url string) (*WebSocketClient, error)
func (*WebSocketClient) Close ¶
func (c *WebSocketClient) Close() error
func (*WebSocketClient) ExecuteTool ¶
func (c *WebSocketClient) ExecuteTool(ctx context.Context, toolCall types.ToolCall) (*types.ToolResult, error)
func (*WebSocketClient) Initialize ¶
func (c *WebSocketClient) Initialize(ctx context.Context) error
func (*WebSocketClient) SendBatchRequest ¶
func (c *WebSocketClient) SendBatchRequest(ctx context.Context, requests []BatchRequest) ([]BatchResponse, error)
SendBatchRequest sends multiple requests in a single batch
func (*WebSocketClient) SendRequest ¶
func (*WebSocketClient) SetInitializeParams ¶
func (c *WebSocketClient) SetInitializeParams(params *types.InitializeParams)
Click to show internal directories.
Click to hide internal directories.