Documentation
¶
Index ¶
- type BaseMessage
- type Client
- func (c *Client) CallTool(ctx context.Context, toolCall tools.ToolCall) (*tools.ToolCallResult, error)
- func (c *Client) CallToolWithArgs(ctx context.Context, toolName string, args any) (*tools.ToolCallResult, error)
- func (c *Client) GetToolByName(name string) (tools.Tool, error)
- func (c *Client) ListTools(ctx context.Context, toolFilter []string) ([]tools.Tool, error)
- func (c *Client) Start(ctx context.Context) error
- func (c *Client) Stop() error
- type RPCResponse
- type Toolset
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BaseMessage ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client implements an MCP client for interacting with MCP servers
func NewRemoteClient ¶
NewRemoteClient creates a new MCP client that can connect to a remote MCP server
func NewStdioClient ¶
NewStdioClient creates a new MCP client that can start an stdio MCP server
func (*Client) CallTool ¶
func (c *Client) CallTool(ctx context.Context, toolCall tools.ToolCall) (*tools.ToolCallResult, error)
CallTool calls a tool on the MCP server
func (*Client) CallToolWithArgs ¶
func (c *Client) CallToolWithArgs(ctx context.Context, toolName string, args any) (*tools.ToolCallResult, error)
CallToolWithArgs is a convenience method to call a tool with arguments
func (*Client) GetToolByName ¶
GetToolByName returns a tool by name
type RPCResponse ¶
type RPCResponse struct { Error *string Response *json.RawMessage }
type Toolset ¶
type Toolset struct {
// contains filtered or unexported fields
}
Toolset represents a set of MCP tools
func NewToolsetCommand ¶
NewToolsetCommand creates a new MCP toolset from a command.
func NewToolsetRemote ¶
func NewToolsetRemote(url, transport string, headers map[string]string, toolFilter []string) (*Toolset, error)
NewToolsetRemote creates a new MCP toolset from a remote MCP Server.
func (*Toolset) Instructions ¶
Instructions returns the toolset instructions
Click to show internal directories.
Click to hide internal directories.