HostedMcpServerTool.ApprovalMode Property
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.
Gets or sets the approval mode that indicates when the AI service should require user approval for tool calls to the remote MCP server.
public:
property Microsoft::Extensions::AI::HostedMcpServerToolApprovalMode ^ ApprovalMode { Microsoft::Extensions::AI::HostedMcpServerToolApprovalMode ^ get(); void set(Microsoft::Extensions::AI::HostedMcpServerToolApprovalMode ^ value); };
public Microsoft.Extensions.AI.HostedMcpServerToolApprovalMode? ApprovalMode { get; set; }
member this.ApprovalMode : Microsoft.Extensions.AI.HostedMcpServerToolApprovalMode with get, set
Public Property ApprovalMode As HostedMcpServerToolApprovalMode
Property Value
Remarks
You can set this property to AlwaysRequire to require approval for all tool calls, or to NeverRequire to never require approval.
The default value is null, which some providers might treat the same as AlwaysRequire.
The underlying provider is not guaranteed to support or honor the approval mode.