Lingua

ProjectsAgentsModelFactory.VoiceAgentMcpTool Method

Definition

An MCP tool available to a voice agent.

public static Azure.AI.Projects.Agents.VoiceAgentMcpTool VoiceAgentMcpTool(string serverLabel = default, string authorization = default, string serverDescription = default, System.Collections.Generic.IDictionary<string,string> headers = default, BinaryData allowedTools = default, System.Collections.Generic.IEnumerable<OpenAI.CallableToolAllowedCaller> allowedCallers = default, BinaryData requireApproval = default, bool? deferLoading = default, string projectConnectionId = default, System.Collections.Generic.IDictionary<string,Azure.AI.Extensions.OpenAI.ToolConfig> toolConfigs = default, Uri serverUrl = default, Azure.AI.Projects.Agents.VoiceAgentToolResponseScheduling? responseScheduling = default);
static member VoiceAgentMcpTool : string * string * string * System.Collections.Generic.IDictionary<string, string> * BinaryData * seq<OpenAI.CallableToolAllowedCaller> * BinaryData * Nullable<bool> * string * System.Collections.Generic.IDictionary<string, Azure.AI.Extensions.OpenAI.ToolConfig> * Uri * Nullable<Azure.AI.Projects.Agents.VoiceAgentToolResponseScheduling> -> Azure.AI.Projects.Agents.VoiceAgentMcpTool
Public Shared Function VoiceAgentMcpTool (Optional serverLabel As String = Nothing, Optional authorization As String = Nothing, Optional serverDescription As String = Nothing, Optional headers As IDictionary(Of String, String) = Nothing, Optional allowedTools As BinaryData = Nothing, Optional allowedCallers As IEnumerable(Of CallableToolAllowedCaller) = Nothing, Optional requireApproval As BinaryData = Nothing, Optional deferLoading As Nullable(Of Boolean) = Nothing, Optional projectConnectionId As String = Nothing, Optional toolConfigs As IDictionary(Of String, ToolConfig) = Nothing, Optional serverUrl As Uri = Nothing, Optional responseScheduling As Nullable(Of VoiceAgentToolResponseScheduling) = Nothing) As VoiceAgentMcpTool

Parameters

serverLabel
String

A label for this MCP server, used to identify it in tool calls.

authorization
String

An OAuth access token that can be used with a remote MCP server, either with a custom MCP server URL or a service connector. Your application must handle the OAuth authorization flow and provide the token here.

serverDescription
String

Optional description of the MCP server, used to provide more context.

allowedTools
BinaryData
requireApproval
BinaryData
deferLoading
Nullable<Boolean>

Whether this MCP tool is deferred and discovered via tool search.

projectConnectionId
String

The connection ID in the project for the MCP server. The connection stores authentication and other connection details needed to connect to the MCP server.

toolConfigs
IDictionary<String,ToolConfig>

Deprecated. This property is deprecated and will be removed in a future version.

serverUrl
Uri

The URL for the MCP server.

responseScheduling
Nullable<VoiceAgentToolResponseScheduling>

When the MCP invocation creates a follow-up response. Defaults to when_idle.

Returns

A new VoiceAgentMcpTool instance for mocking.

Applies to