Language

VoiceAgentMcpTool Class

Definition

An MCP tool available to a voice agent.

public class VoiceAgentMcpTool : Azure.AI.Projects.Agents.VoiceAgentTool, System.ClientModel.Primitives.IJsonModel<Azure.AI.Projects.Agents.VoiceAgentMcpTool>, System.ClientModel.Primitives.IPersistableModel<Azure.AI.Projects.Agents.VoiceAgentMcpTool>
type VoiceAgentMcpTool = class
    inherit VoiceAgentTool
    interface IJsonModel<VoiceAgentMcpTool>
    interface IPersistableModel<VoiceAgentMcpTool>
Public Class VoiceAgentMcpTool
Inherits VoiceAgentTool
Implements IJsonModel(Of VoiceAgentMcpTool), IPersistableModel(Of VoiceAgentMcpTool)
Inheritance
VoiceAgentMcpTool
Implements

Constructors

Name Description
VoiceAgentMcpTool(String)

Initializes a new instance of VoiceAgentMcpTool.

Properties

Name Description
AllowedCallers

Gets or sets the AllowedCallers.

AllowedTools

Gets or sets the AllowedTools.

To assign an object to this property use FromObjectAsJson<T>(T, JsonSerializerOptions).

To assign an already formatted json string to this property use FromString(String).

<remarks> Supported types:

</remarks>

Examples:

  • BinaryData.FromObjectAsJson("foo"). : Creates a payload of "foo".
  • BinaryData.FromString("\"foo\""). : Creates a payload of "foo".
  • BinaryData.FromObjectAsJson(new { key = "value" }). : Creates a payload of { "key": "value" }.
  • BinaryData.FromString("{\"key\": \"value\"}"). : Creates a payload of { "key": "value" }.

Authorization

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.

DeferLoading

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

Headers

Gets or sets the Headers.

ProjectConnectionId

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.

RequireApproval

Gets or sets the RequireApproval.

To assign an object to this property use FromObjectAsJson<T>(T, JsonSerializerOptions).

To assign an already formatted json string to this property use FromString(String).

<remarks> Supported types:

  • OpenAI.Responses.McpToolCallApprovalPolicy.
  • "always".
  • "never".
</remarks>

Examples:

  • BinaryData.FromObjectAsJson("foo"). : Creates a payload of "foo".
  • BinaryData.FromString("\"foo\""). : Creates a payload of "foo".
  • BinaryData.FromObjectAsJson(new { key = "value" }). : Creates a payload of { "key": "value" }.
  • BinaryData.FromString("{\"key\": \"value\"}"). : Creates a payload of { "key": "value" }.

ResponseScheduling

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

ServerDescription

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

ServerLabel

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

ServerUrl

The URL for the MCP server.

ToolConfigs

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

Methods

Name Description
JsonModelCreateCore(Utf8JsonReader, ModelReaderWriterOptions)
JsonModelWriteCore(Utf8JsonWriter, ModelReaderWriterOptions)
PersistableModelCreateCore(BinaryData, ModelReaderWriterOptions)
PersistableModelWriteCore(ModelReaderWriterOptions)

Explicit Interface Implementations

Name Description
IJsonModel<VoiceAgentMcpTool>.Create(Utf8JsonReader, ModelReaderWriterOptions)
IJsonModel<VoiceAgentMcpTool>.Write(Utf8JsonWriter, ModelReaderWriterOptions)
IJsonModel<VoiceAgentTool>.Create(Utf8JsonReader, ModelReaderWriterOptions) (Inherited from VoiceAgentTool)
IJsonModel<VoiceAgentTool>.Write(Utf8JsonWriter, ModelReaderWriterOptions) (Inherited from VoiceAgentTool)
IPersistableModel<VoiceAgentMcpTool>.Create(BinaryData, ModelReaderWriterOptions)
IPersistableModel<VoiceAgentMcpTool>.GetFormatFromOptions(ModelReaderWriterOptions)
IPersistableModel<VoiceAgentMcpTool>.Write(ModelReaderWriterOptions)
IPersistableModel<VoiceAgentTool>.Create(BinaryData, ModelReaderWriterOptions) (Inherited from VoiceAgentTool)
IPersistableModel<VoiceAgentTool>.GetFormatFromOptions(ModelReaderWriterOptions) (Inherited from VoiceAgentTool)
IPersistableModel<VoiceAgentTool>.Write(ModelReaderWriterOptions) (Inherited from VoiceAgentTool)

Applies to