toolset

package
v0.4.2 Latest Latest
Warning

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

Go to latest
Published: Feb 8, 2026 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ValidateNormanClient

func ValidateNormanClient(client interface{}) (*norman.Client, error)

ValidateNormanClient validates and returns a configured Norman client. Returns ErrRancherNotConfigured if the client is nil or not configured.

func ValidateSteveClient

func ValidateSteveClient(client interface{}) (*steve.Client, error)

ValidateSteveClient validates and returns a configured Steve client. Returns ErrSteveNotConfigured if the client is nil.

Types

type CombinedClient

type CombinedClient struct {
	Norman *norman.Client
	Steve  *steve.Client
}

CombinedClient holds both Norman and Steve clients.

type ServerTool

type ServerTool struct {
	// Tool is the MCP tool definition.
	Tool mcp.Tool

	// Annotations provides additional metadata about the tool.
	Annotations ToolAnnotations

	// Handler is the function that handles tool calls.
	Handler ToolHandler
}

ServerTool represents an MCP tool with its metadata and handler. This is a wrapper around mcp.Tool that includes additional server-specific information.

type ToolAnnotations

type ToolAnnotations struct {
	// ReadOnlyHint indicates if the tool is read-only.
	ReadOnlyHint *bool

	// DestructiveHint indicates if the tool performs destructive operations.
	DestructiveHint *bool

	// RequiresRancher indicates if the tool requires Rancher configuration.
	RequiresRancher *bool

	// RequiresKubernetes indicates if the tool requires Kubernetes configuration.
	RequiresKubernetes *bool
}

ToolAnnotations provides additional metadata for tools.

type ToolHandler

type ToolHandler func(client interface{}, params map[string]interface{}) (string, error)

ToolHandler is the function signature for handling tool calls.

type Toolset

type Toolset interface {
	// GetName returns the name of the toolset.
	GetName() string

	// GetDescription returns the description of the toolset.
	GetDescription() string

	// GetTools returns the tools provided by this toolset.
	GetTools(client interface{}) []ServerTool
}

Toolset defines the interface for a set of MCP tools.

Directories

Path Synopsis
Package kubernetes provides the Kubernetes toolset using Steve API.
Package kubernetes provides the Kubernetes toolset using Steve API.
Package rancher provides Rancher-specific toolset for multi-cluster management.
Package rancher provides Rancher-specific toolset for multi-cluster management.

Jump to

Keyboard shortcuts

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