Share via


IMcpToolRegistrationService.GetMcpToolsAsync Method

Definition

Returns a List of MCP tools to be added to the agent.

public System.Threading.Tasks.Task<System.Collections.Generic.IList<Microsoft.Extensions.AI.AITool>> GetMcpToolsAsync(string agentUserId, Microsoft.Agents.Builder.App.UserAuth.UserAuthorization userAuthorization, string authHandlerName, Microsoft.Agents.Builder.ITurnContext turnContext, string? authToken = default);
abstract member GetMcpToolsAsync : string * Microsoft.Agents.Builder.App.UserAuth.UserAuthorization * string * Microsoft.Agents.Builder.ITurnContext * string -> System.Threading.Tasks.Task<System.Collections.Generic.IList<Microsoft.Extensions.AI.AITool>>
Public Function GetMcpToolsAsync (agentUserId As String, userAuthorization As UserAuthorization, authHandlerName As String, turnContext As ITurnContext, Optional authToken As String = Nothing) As Task(Of IList(Of AITool))

Parameters

agentUserId
String

Agent User Id for the agent.

userAuthorization
UserAuthorization

User authorization information

authHandlerName
String

Authentication Handler Name for use with the UserAuthorization System

turnContext
ITurnContext

Turn context for the current request

authToken
String

Optional auth token to access the MCP servers.

Returns

List of AI Tools be added to an agent.

Applies to