Add EverythingServer sample (#151)

This commit is contained in:
Aaron Powell 2025-04-05 05:48:53 +11:00 • committed by GitHub
commit 01410df5ad
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -0,0 +1,11 @@
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}";
}