csharp-sdk/samples/EverythingServer/Tools/AddTool.cs
2025-04-04 11:48:53 -07:00

11 lines
300 B
C#

using ModelContextProtocol.Server;
using System.ComponentModel;
namespace EverythingServer.Tools;
[McpServerToolType]
public class AddTool
{
[McpServerTool(Name = "add"), Description("Adds two numbers.")]
public static string Add(int a, int b) => $"The sum of {a} and {b} is {a + b}";
}