system

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2025 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	GetDashboardInfo = "get_dashboard_info"
)
View Source
const (
	GetSystemInfo = "get_system_info"
)

Variables

View Source
var GetDashboardInfoTool = mcp.NewServerTool[GetDashboardInfoInput, any](
	GetDashboardInfo,
	"show dashboard info",
	func(ctx context.Context, _ *mcp.ServerSession, params *mcp.CallToolParamsFor[GetDashboardInfoInput]) (*mcp.CallToolResultFor[any], error) {
		client := utils.NewPanelClient("GET", "/dashboard/base/all/all")
		info := &types.DashboardRes{}
		result, err := client.Request(info)
		if result != nil {
			result.StructuredContent = info
		}
		return result, err
	},
)
View Source
var GetSystemInfoTool = mcp.NewServerTool[GetSystemInfoInput, any](
	GetSystemInfo,
	"show host system information, The unit of diskSize is bytes",
	func(ctx context.Context, _ *mcp.ServerSession, params *mcp.CallToolParamsFor[GetSystemInfoInput]) (*mcp.CallToolResultFor[any], error) {
		client := utils.NewPanelClient("GET", "/dashboard/base/os")
		osInfo := &types.OsInfoRes{}
		result, err := client.Request(osInfo)
		if result != nil {
			result.StructuredContent = osInfo
		}
		return result, err
	},
)

Functions

This section is empty.

Types

type GetDashboardInfoInput added in v0.2.0

type GetDashboardInfoInput struct{}

type GetSystemInfoInput added in v0.2.0

type GetSystemInfoInput struct{}

Jump to

Keyboard shortcuts

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