ToolApprovalRequestContentExtensions.CreateAlwaysApproveToolWithArgumentsResponse Method

Definition

Creates an approved AlwaysApproveToolApprovalResponseContent that also instructs the middleware to always approve future calls to the same tool with the exact same arguments.

public static Microsoft.Agents.AI.AlwaysApproveToolApprovalResponseContent CreateAlwaysApproveToolWithArgumentsResponse(this Microsoft.Extensions.AI.ToolApprovalRequestContent request, string? reason = default);
static member CreateAlwaysApproveToolWithArgumentsResponse : Microsoft.Extensions.AI.ToolApprovalRequestContent * string -> Microsoft.Agents.AI.AlwaysApproveToolApprovalResponseContent
<Extension()>
Public Function CreateAlwaysApproveToolWithArgumentsResponse (request As ToolApprovalRequestContent, Optional reason As String = Nothing) As AlwaysApproveToolApprovalResponseContent

Parameters

request
ToolApprovalRequestContent

The tool approval request to respond to.

reason
String

An optional reason for the approval.

Returns

An AlwaysApproveToolApprovalResponseContent wrapping an approved ToolApprovalResponseContent with the AlwaysApproveToolWithArguments flag set to true.

Applies to