Add EverythingServer sample (#151)
This commit is contained in:
parent
d21d933876
commit
01410df5ad
1 changed files with 620 additions and 1 deletions
11
samples/EverythingServer/Tools/AddTool.cs
Normal file
11
samples/EverythingServer/Tools/AddTool.cs
Normal 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}";
|
||||
}
|
||||
Loading…
Reference in a new issue