Example with instance methods #827
-
Pre-submission Checklist
Question Category
Your QuestionIs there an example somewhere that shows how to implement the tool methods as instance methods on a type? All the examples I can find have the methods as I've seen references to the concept of tools as instance methods, but can't find an example. I appreciate any help! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
There are a few examples in the repo, e.g. https://github.com/modelcontextprotocol/csharp-sdk/blob/main/samples/AspNetCoreMcpServer/Tools/WeatherTools.cs. |
Beta Was this translation helpful? Give feedback.
There are a few examples in the repo, e.g. https://github.com/modelcontextprotocol/csharp-sdk/blob/main/samples/AspNetCoreMcpServer/Tools/WeatherTools.cs.