tool

package
v0.0.0-...-5e18d9c Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 17, 2026 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

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 DiscoveryStore interface {
	ListTools(context.Context) ([]database.Tool, error)
	ListToolServers(context.Context) ([]database.ToolServer, error)
}

type MCPAppTool

type MCPAppTool struct {
	Name          string
	Description   string
	InputSchema   any
	UIResourceURI string
	Meta          map[string]any
}

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

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 (s *Service) CreateToolServer(ctx context.Context, request CreateToolServerRequest) (client.Object, error)

func (*Service) DeleteToolServer

func (s *Service) DeleteToolServer(ctx context.Context, ref types.NamespacedName) error

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) ListTools

func (s *Service) ListTools(ctx context.Context) ([]database.Tool, error)

func (*Service) ReadMCPAppResource

func (s *Service) ReadMCPAppResource(ctx context.Context, ref MCPServerRef, uri string) (*mcp.ReadResourceResult, error)

type ToolServer

type ToolServer struct {
	Ref             string
	GroupKind       string
	DiscoveredTools []*v1alpha3.MCPTool
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL