McpToolRegistrationService.AddToolServersToAgent Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Add new MCP servers to the agent by updating the PersistentAgentsClient.
public void AddToolServersToAgent(Azure.AI.Agents.Persistent.PersistentAgentsClient agentClient, string agentInstanceId, Microsoft.Agents.Builder.App.UserAuth.UserAuthorization userAuthorization, Microsoft.Agents.Builder.ITurnContext turnContext, string? authToken = default);
member this.AddToolServersToAgent : Azure.AI.Agents.Persistent.PersistentAgentsClient * string * Microsoft.Agents.Builder.App.UserAuth.UserAuthorization * Microsoft.Agents.Builder.ITurnContext * string -> unit
Public Sub AddToolServersToAgent (agentClient As PersistentAgentsClient, agentInstanceId As String, userAuthorization As UserAuthorization, turnContext As ITurnContext, Optional authToken As String = Nothing)
Parameters
- agentClient
- PersistentAgentsClient
PersistentAgentsClient instance for the agent.
- agentInstanceId
- String
The ID of the agent instance.
- userAuthorization
- UserAuthorization
User authorization information.
- turnContext
- ITurnContext
Turn context for the current request.
- authToken
- String
Authentication token for MCP server access.