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{}
Click to show internal directories.
Click to hide internal directories.