List tools from DI once (#115)
* List tools from DI once - Follow best practice to not mutate options outside of IConfigureOptions - Long-term, we should move the repeated work from SetToolsHandler into an IPostConfigureOptions service or IMcpServerConnectionFactory * Add Can_Create_Multiple_Servers_From_Options_And_List_Registered_Tools * Flip stdin and stdout in StreamClientTransport * s/McpToolType/McpServerToolType * Clarify stdin and stdout refers to server process in StreamClientTransport * fixup
This commit is contained in:
parent
3c72c348d6
commit
4a53f6f6d0
1 changed files with 133 additions and 49 deletions
|
|
@ -80,7 +80,7 @@ var response = await chatClient.GetResponseAsync(
|
|||
|
||||
Here is an example of how to create an MCP server and register all tools from the current application.
|
||||
It includes a simple echo tool as an example (this is included in the same file here for easy of copy and paste, but it needn't be in the same file...
|
||||
the employed overload of `WithTools` examines the current assembly for classes with the `McpToolType` attribute, and registers all methods with the
|
||||
the employed overload of `WithTools` examines the current assembly for classes with the `McpServerToolType` attribute, and registers all methods with the
|
||||
`McpTool` attribute as tools.)
|
||||
|
||||
```csharp
|
||||
|
|
|
|||
Loading…
Reference in a new issue