AgentSkillsProvider.ReadOnlyToolsAutoApprovalRule 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 an auto-approval rule that approves the read-only skill tools (LoadSkillToolName and ReadSkillResourceToolName).
public static Func<Microsoft.Extensions.AI.FunctionCallContent,System.Threading.Tasks.ValueTask<bool>> ReadOnlyToolsAutoApprovalRule { get; }
static member ReadOnlyToolsAutoApprovalRule : Func<Microsoft.Extensions.AI.FunctionCallContent, System.Threading.Tasks.ValueTask<bool>>
Public Shared ReadOnly Property ReadOnlyToolsAutoApprovalRule As Func(Of FunctionCallContent, ValueTask(Of Boolean))
Property Value
Remarks
This rule only applies when approval is enabled for the matching tools in AgentSkillsProviderOptions. When the read-only skill tools require approval, add this rule to AutoApprovalRules to automatically approve only the tools that read skill content, while still prompting for script execution (RunSkillScriptToolName) if it also requires approval.
The rule matches on the tool name, returning true for read-only skill tools and false for all other tool calls so that subsequent rules continue to be evaluated.