Documentation
¶
Index ¶
- func CallToolLocal(ctx context.Context, cmd string, cmdArgs []string, tool string, ...) (*mcp.CallToolResult, *mcp.CreateMessageRequest, *mcp.ElicitRequest, error)
- func CallToolRemote(ctx context.Context, url, apiKey, header string, sse bool, tool string, ...) (*mcp.CallToolResult, *mcp.CreateMessageRequest, *mcp.ElicitRequest, error)
- func GetPromptLocal(ctx context.Context, cmd string, cmdArgs []string, prompt string, ...) (*mcp.GetPromptResult, error)
- func GetPromptRemote(ctx context.Context, url, apiKey, header string, sse bool, prompt string, ...) (*mcp.GetPromptResult, error)
- func ReadResourceLocal(ctx context.Context, cmd string, cmdArgs []string, uri string) (*mcp.ReadResourceResult, error)
- func ReadResourceRemote(ctx context.Context, url, apiKey, header string, sse bool, uri string) (*mcp.ReadResourceResult, error)
- type ListOptions
- type ListOutput
- type SessionManager
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CallToolLocal ¶
func CallToolLocal(ctx context.Context, cmd string, cmdArgs []string, tool string, toolArgs map[string]any) (*mcp.CallToolResult, *mcp.CreateMessageRequest, *mcp.ElicitRequest, error)
func CallToolRemote ¶
func CallToolRemote(ctx context.Context, url, apiKey, header string, sse bool, tool string, toolArgs map[string]any) (*mcp.CallToolResult, *mcp.CreateMessageRequest, *mcp.ElicitRequest, error)
func GetPromptLocal ¶
func GetPromptRemote ¶
func ReadResourceLocal ¶
func ReadResourceRemote ¶
Types ¶
type ListOptions ¶
type ListOptions uint
const ( ListPrompts ListOptions = 1 << iota ListResources ListTools )
type ListOutput ¶
type ListOutput struct {
Prompts []*mcp.Prompt `json:"prompts,omitempty"`
Resources []*mcp.Resource `json:"resources,omitempty"`
Tools []*mcp.Tool `json:"tools,omitempty"`
ToolListChanged bool `json:"tool_list_changed,omitempty"`
PromptListChanged bool `json:"prompt_list_changed,omitempty"`
ResourceListChanged bool `json:"resource_list_changed,omitempty"`
ResourceSubscribe bool `json:"resource_subscribe,omitempty"`
Logging bool `json:"logging,omitempty"`
Completions bool `json:"completions,omitempty"`
}
func ListLocal ¶
func ListLocal(ctx context.Context, cmd string, args []string, lstOpts ListOptions) (*ListOutput, error)
func ListRemote ¶
func ListRemote(ctx context.Context, url, apiKey, header string, sse bool, lstOpts ListOptions) (*ListOutput, error)
type SessionManager ¶
type SessionManager struct {
// contains filtered or unexported fields
}
func NewSessionManager ¶
func NewSessionManager(url, apiKey, header string, sse bool) SessionManager
func (*SessionManager) Close ¶
func (sm *SessionManager) Close()
func (*SessionManager) WithSession ¶
Click to show internal directories.
Click to hide internal directories.