-
Notifications
You must be signed in to change notification settings - Fork 5k
Open
Labels
AI AgentsClientThis issue is related to a non-management packageThis issue is related to a non-management packageService AttentionWorkflow: This issue is responsible by Azure service team.Workflow: This issue is responsible by Azure service team.customer-reportedIssues that are reported by GitHub users external to the Azure organization.Issues that are reported by GitHub users external to the Azure organization.needs-team-attentionWorkflow: This issue needs attention from Azure service team or SDK teamWorkflow: This issue needs attention from Azure service team or SDK teamquestionThe issue doesn't require a change to the product in order to be resolved. Most issues start as thatThe issue doesn't require a change to the product in order to be resolved. Most issues start as that
Description
The MCPApproval class has a constructor:
azure-sdk-for-net/sdk/ai/Azure.AI.Agents.Persistent/src/Custom/MCPApproval.cs
Lines 54 to 55 in ea4b6a1
/// <param name="trust">The trust level, can be "always" or "never"</param> | |
public MCPApproval(string trust) |
I read that "trust" parameter being "always" or "never" as meaning whether to always trust a tool or never trust a tool. But it's the opposite. "always" here maps to approval always being required, and "never" maps to approval never being required, which is the opposite of the tool "always" being trusted or "never" being trusted, as highlighted by the subsequent properties:
azure-sdk-for-net/sdk/ai/Azure.AI.Agents.Persistent/src/Custom/MCPApproval.cs
Lines 61 to 68 in ea4b6a1
/// <summary> | |
/// Return true if we do not trust all tool and always need to ask for approval before sending data to server. | |
/// </summary> | |
public bool AlwaysApprove{get => string.Equals(_forAllToolsApproval, ALWAYS);} | |
/// <summary> | |
/// Return true if we trust all tools and do not need to ask for approval before before sending data to server. | |
/// </summary> | |
public bool NeverApprove { get => string.Equals(_forAllToolsApproval, NEVER); } |
This parameter should be renamed, e.g. "requireApproval".
I suggest those properties should also be renamed. "AlwaysApprove" reads different to me than "AlwaysRequireApproval"; the former sounds like it's saying the system should always automatically approve of any tool calls, but that's the opposite of which it actually means, which is that all tool calls require approval.
Metadata
Metadata
Assignees
Labels
AI AgentsClientThis issue is related to a non-management packageThis issue is related to a non-management packageService AttentionWorkflow: This issue is responsible by Azure service team.Workflow: This issue is responsible by Azure service team.customer-reportedIssues that are reported by GitHub users external to the Azure organization.Issues that are reported by GitHub users external to the Azure organization.needs-team-attentionWorkflow: This issue needs attention from Azure service team or SDK teamWorkflow: This issue needs attention from Azure service team or SDK teamquestionThe issue doesn't require a change to the product in order to be resolved. Most issues start as thatThe issue doesn't require a change to the product in order to be resolved. Most issues start as that