22 lines
476 B
C#
22 lines
476 B
C#
|
using ModelContextProtocol.Server;
|
|||
|
using System.ComponentModel;
|
|||
|
|
|||
|
namespace XiaoZhiSharp_ConsoleApp.McpTools
|
|||
|
{
|
|||
|
[McpServerToolType]
|
|||
|
public sealed class IotThings_Tool
|
|||
|
{
|
|||
|
[McpServerTool, Description("开灯")]
|
|||
|
public static string Light_ON()
|
|||
|
{
|
|||
|
return "开灯成功";
|
|||
|
}
|
|||
|
|
|||
|
[McpServerTool, Description("关灯")]
|
|||
|
public static string Light_OFF()
|
|||
|
{
|
|||
|
return "关灯成功";
|
|||
|
}
|
|||
|
}
|
|||
|
}
|