Documentation
¶
Index ¶
- Constants
- func NewTextResult(content string, err error) *mcp.CallToolResult
- func ServerToolToM3LabsServerTool(s *Server, tools []api.ServerTool) ([]server.ServerTool, error)
- type Configuration
- type ContextKey
- type Server
- func (s *Server) Close()
- func (s *Server) GetEnabledTools() []string
- func (s *Server) GetTargetParameterName() string
- func (s *Server) KubernetesApiVerifyToken(ctx context.Context, token string, audience string, cluster string) (*authenticationapiv1.UserInfo, []string, error)
- func (s *Server) ServeHTTP(httpServer *http.Server) *server.StreamableHTTPServer
- func (s *Server) ServeSse(baseUrl string, httpServer *http.Server) *server.SSEServer
- func (s *Server) ServeStdio() error
- type ToolFilter
- type ToolMutator
Constants ¶
View Source
const TokenScopesContextKey = ContextKey("TokenScopesContextKey")
Variables ¶
This section is empty.
Functions ¶
func NewTextResult ¶
func NewTextResult(content string, err error) *mcp.CallToolResult
func ServerToolToM3LabsServerTool ¶ added in v0.0.52
func ServerToolToM3LabsServerTool(s *Server, tools []api.ServerTool) ([]server.ServerTool, error)
Types ¶
type Configuration ¶
type Configuration struct { *config.StaticConfig // contains filtered or unexported fields }
func (*Configuration) ListOutput ¶
func (c *Configuration) ListOutput() output.Output
func (*Configuration) Toolsets ¶ added in v0.0.52
func (c *Configuration) Toolsets() []api.Toolset
type ContextKey ¶ added in v0.0.48
type ContextKey string
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
func NewServer ¶
func NewServer(configuration Configuration) (*Server, error)
func (*Server) GetEnabledTools ¶
func (*Server) GetTargetParameterName ¶ added in v0.0.53
GetTargetParameterName returns the parameter name used for target identification in MCP requests
func (*Server) KubernetesApiVerifyToken ¶ added in v0.0.49
func (s *Server) KubernetesApiVerifyToken(ctx context.Context, token string, audience string, cluster string) (*authenticationapiv1.UserInfo, []string, error)
KubernetesApiVerifyToken verifies the given token with the audience by sending an TokenReview request to API Server for the specified cluster.
func (*Server) ServeHTTP ¶
func (s *Server) ServeHTTP(httpServer *http.Server) *server.StreamableHTTPServer
func (*Server) ServeStdio ¶
type ToolFilter ¶ added in v0.0.53
type ToolFilter func(tool api.ServerTool) bool
ToolFilter is a function that takes a ServerTool and returns a boolean indicating whether to include the tool
func CompositeFilter ¶ added in v0.0.53
func CompositeFilter(filters ...ToolFilter) ToolFilter
func ShouldIncludeTargetListTool ¶ added in v0.0.53
func ShouldIncludeTargetListTool(targetName string, targets []string) ToolFilter
type ToolMutator ¶ added in v0.0.53
type ToolMutator func(tool api.ServerTool) api.ServerTool
func WithTargetParameter ¶ added in v0.0.53
func WithTargetParameter(defaultCluster, targetParameterName string, targets []string) ToolMutator
WithTargetParameter adds a target selection parameter to the tool's input schema if the tool is cluster-aware
Click to show internal directories.
Click to hide internal directories.