Skip to content

Commit d439d38

Browse files
committed
feat: upgrade ModelContextProtocol 0.1.0-preview.2
1 parent b80cba3 commit d439d38

File tree

5 files changed

+10
-8
lines changed

5 files changed

+10
-8
lines changed

Directory.Packages.props

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,8 @@
110110
<PackageVersion Include="MSTest.TestFramework" Version="3.1.1" />
111111
<PackageVersion Include="Microsoft.Extensions.DependencyInjection" Version="8.0.1" />
112112
<PackageVersion Include="Microsoft.Extensions.Hosting" Version="8.0.0" />
113-
<PackageVersion Include="ModelContextProtocol" Version="0.1.0-preview.1.25171.12" />
113+
<PackageVersion Include="ModelContextProtocol" Version="0.1.0-preview.2" />
114+
<PackageVersion Include="System.Linq.Async" Version="6.0.1" />
114115
</ItemGroup>
115116
<ItemGroup>
116117
<PackageVersion Include="BotSharp.Core" Version="$(BotSharpVersion)" />

tests/BotSharp.PizzaBot.MCPServer/Program.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22
using ModelContextProtocol;
33

44
var builder = WebApplication.CreateBuilder(args);
5-
builder.Services.AddMcpServer().WithTools();
5+
builder.Services.AddMcpServer()
6+
.WithToolsFromAssembly();
67
var app = builder.Build();
78

89
app.MapGet("/", () => "This is a test server with only stub functionality!");

tests/BotSharp.PizzaBot.MCPServer/Tools/MakePayment.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@
44

55
namespace BotSharp.PizzaBot.MCPServer.Tools;
66

7-
[McpToolType]
7+
[McpServerToolType]
88
public static class MakePayment
99
{
10-
[McpTool(name: "make_payment"), Description("call this function to make payment.")]
10+
[McpServerTool(name: "make_payment"), Description("call this function to make payment.")]
1111
public static string Make_Payment(
1212
[Description("order number"),Required] string order_number,
1313
[Description("total amount"),Required] int total_amount)

tests/BotSharp.PizzaBot.MCPServer/Tools/PizzaPrices.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@
66

77
namespace BotSharp.PizzaBot.MCPServer.Tools;
88

9-
[McpToolType]
9+
[McpServerToolType]
1010
public static class PizzaPrices
1111
{
12-
[McpTool(name: "get_pizza_prices"), Description("call this function to get pizza unit price.")]
12+
[McpServerTool(name: "get_pizza_prices"), Description("call this function to get pizza unit price.")]
1313
public static string GetPizzaPrices(
1414
[Description("The pizza type."), Required] string pizza_type,
1515
[Description("quantity of pizza"), Required] int quantity)

tests/BotSharp.PizzaBot.MCPServer/Tools/PlaceOrder.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@
44

55
namespace BotSharp.PizzaBot.MCPServer.Tools;
66

7-
[McpToolType]
7+
[McpServerToolType]
88
public static class PlaceOrder
99
{
10-
[McpTool(name: "place_an_order"), Description("Place an order when user has confirmed the pizza type and quantity.")]
10+
[McpServerTool(name: "place_an_order"), Description("Place an order when user has confirmed the pizza type and quantity.")]
1111
public static string PlaceAnOrder(
1212
[Description("The pizza type."), Required] string pizza_type,
1313
[Description("quantity of pizza"), Required] int quantity,

0 commit comments

Comments
 (0)