Support discovery of tools that use DI with McpTool
attribute
#80
Labels
enhancement
New feature or request
McpTool
attribute
#80
Is your feature request related to a problem? Please describe.
Currently, discovery of tools using
[McpToolType]
and[McpTool]
is only supported for public static methods (ref). It would be useful to also support instance methods when the class is registered in DI.Describe the solution you'd like
Program.cs
TodoApi.cs
Describe alternatives you've considered
There is currently an option to manually configure the
ServerCapabilities.Tools
, so this is a workaround.The text was updated successfully, but these errors were encountered: