File tree Expand file tree Collapse file tree 5 files changed +10
-8
lines changed
tests/BotSharp.PizzaBot.MCPServer Expand file tree Collapse file tree 5 files changed +10
-8
lines changed Original file line number Diff line number Diff line change 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)" />
Original file line number Diff line number Diff line change 22using ModelContextProtocol ;
33
44var builder = WebApplication . CreateBuilder ( args ) ;
5- builder . Services . AddMcpServer ( ) . WithTools ( ) ;
5+ builder . Services . AddMcpServer ( )
6+ . WithToolsFromAssembly ( ) ;
67var app = builder . Build ( ) ;
78
89app . MapGet ( "/" , ( ) => "This is a test server with only stub functionality!" ) ;
Original file line number Diff line number Diff line change 44
55namespace BotSharp . PizzaBot . MCPServer . Tools ;
66
7- [ McpToolType ]
7+ [ McpServerToolType ]
88public 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 )
Original file line number Diff line number Diff line change 66
77namespace BotSharp . PizzaBot . MCPServer . Tools ;
88
9- [ McpToolType ]
9+ [ McpServerToolType ]
1010public 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 )
Original file line number Diff line number Diff line change 44
55namespace BotSharp . PizzaBot . MCPServer . Tools ;
66
7- [ McpToolType ]
7+ [ McpServerToolType ]
88public 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 ,
You can’t perform that action at this time.
0 commit comments