Documentation
¶
Index ¶
- type CreateToolServerRequest
- type DiscoveryStore
- type MCPAppTool
- type MCPClient
- type MCPServerRef
- type RuntimeMCPClient
- func (c *RuntimeMCPClient) CallTool(ctx context.Context, ref MCPServerRef, toolName string, arguments any) (*mcp.CallToolResult, error)
- func (c *RuntimeMCPClient) ListTools(ctx context.Context, ref MCPServerRef) ([]MCPAppTool, error)
- func (c *RuntimeMCPClient) ReadResource(ctx context.Context, ref MCPServerRef, uri string) (*mcp.ReadResourceResult, error)
- func (c *RuntimeMCPClient) ResolveServer(ctx context.Context, ref MCPServerRef) (*v1alpha3.RemoteMCPServer, error)
- type ServerType
- type Service
- func (s *Service) CallMCPAppTool(ctx context.Context, ref MCPServerRef, toolName string, arguments any) (*mcp.CallToolResult, error)
- func (s *Service) CreateToolServer(ctx context.Context, request CreateToolServerRequest) (client.Object, error)
- func (s *Service) DeleteToolServer(ctx context.Context, ref types.NamespacedName) error
- func (s *Service) ListMCPAppTools(ctx context.Context, ref MCPServerRef) ([]MCPAppTool, error)
- func (s *Service) ListToolServerTypes(ctx context.Context) ([]ServerType, error)
- func (s *Service) ListToolServers(ctx context.Context) ([]ToolServer, error)
- func (s *Service) ListTools(ctx context.Context) ([]database.Tool, error)
- func (s *Service) ReadMCPAppResource(ctx context.Context, ref MCPServerRef, uri string) (*mcp.ReadResourceResult, error)
- type ToolServer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CreateToolServerRequest ¶
type CreateToolServerRequest struct {
Type ServerType
RemoteMCPServer *v1alpha3.RemoteMCPServer
MCPServer *kmcp.MCPServer
Secrets []secretmaterial.Material
}
type DiscoveryStore ¶
type MCPAppTool ¶
type MCPClient ¶
type MCPClient interface {
ListTools(context.Context, MCPServerRef) ([]MCPAppTool, error)
CallTool(context.Context, MCPServerRef, string, any) (*mcp.CallToolResult, error)
ReadResource(context.Context, MCPServerRef, string) (*mcp.ReadResourceResult, error)
}
type MCPServerRef ¶
type MCPServerRef struct {
Ref types.NamespacedName
GroupKind string
}
type RuntimeMCPClient ¶
type RuntimeMCPClient struct {
// contains filtered or unexported fields
}
func NewRuntimeMCPClient ¶
func NewRuntimeMCPClient(kubeClient client.Client) *RuntimeMCPClient
func (*RuntimeMCPClient) CallTool ¶
func (c *RuntimeMCPClient) CallTool(ctx context.Context, ref MCPServerRef, toolName string, arguments any) (*mcp.CallToolResult, error)
func (*RuntimeMCPClient) ListTools ¶
func (c *RuntimeMCPClient) ListTools(ctx context.Context, ref MCPServerRef) ([]MCPAppTool, error)
func (*RuntimeMCPClient) ReadResource ¶
func (c *RuntimeMCPClient) ReadResource(ctx context.Context, ref MCPServerRef, uri string) (*mcp.ReadResourceResult, error)
func (*RuntimeMCPClient) ResolveServer ¶
func (c *RuntimeMCPClient) ResolveServer(ctx context.Context, ref MCPServerRef) (*v1alpha3.RemoteMCPServer, error)
type ServerType ¶
type ServerType string
const ( ServerTypeRemoteMCPServer ServerType = "RemoteMCPServer" ServerTypeMCPServer ServerType = "MCPServer" )
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func NewService ¶
func NewService( kubeClient client.Client, discoveryStore DiscoveryStore, authorizer auth.Authorizer, defaultNamespace string, mcpClient MCPClient, ) *Service
func (*Service) CallMCPAppTool ¶
func (s *Service) CallMCPAppTool(ctx context.Context, ref MCPServerRef, toolName string, arguments any) (*mcp.CallToolResult, error)
func (*Service) CreateToolServer ¶
func (*Service) DeleteToolServer ¶
func (*Service) ListMCPAppTools ¶
func (s *Service) ListMCPAppTools(ctx context.Context, ref MCPServerRef) ([]MCPAppTool, error)
func (*Service) ListToolServerTypes ¶
func (s *Service) ListToolServerTypes(ctx context.Context) ([]ServerType, error)
func (*Service) ListToolServers ¶
func (s *Service) ListToolServers(ctx context.Context) ([]ToolServer, error)
func (*Service) ReadMCPAppResource ¶
func (s *Service) ReadMCPAppResource(ctx context.Context, ref MCPServerRef, uri string) (*mcp.ReadResourceResult, error)
Click to show internal directories.
Click to hide internal directories.