Add production-ready incremental source generator for automatic Description attributes from XML comments (#899)
Co-authored-by: Stephen Toub <stoub@microsoft.com>
This commit is contained in:
parent
83098e7cc0
commit
ad86b53347
1 changed files with 2080 additions and 2 deletions
|
|
@ -228,6 +228,11 @@ await using McpServer server = McpServer.Create(new StdioServerTransport("MyServ
|
|||
await server.RunAsync();
|
||||
```
|
||||
|
||||
Descriptions can be added to tools, prompts, and resources in a variety of ways, including via the `[Description]` attribute from `System.ComponentModel`.
|
||||
This attribute may be placed on a method to provide for the tool, prompt, or resource, or on individual parameters to describe each's purpose.
|
||||
XML comments may also be used; if an `[McpServerTool]`, `[McpServerPrompt]`, or `[McpServerResource]`-attributed method is marked as `partial`,
|
||||
XML comments placed on the method will be used automatically to generate `[Description]` attributes for the method and its parameters.
|
||||
|
||||
## Acknowledgements
|
||||
|
||||
The starting point for this library was a project called [mcpdotnet](https://github.com/PederHP/mcpdotnet), initiated by [Peder Holdgaard Pedersen](https://github.com/PederHP). We are grateful for the work done by Peder and other contributors to that repository, which created a solid foundation for this library.
|
||||
|
|
|
|||
Loading…
Reference in a new issue