MCPcopy Create free account
hub / github.com/UsefulSoftwareCo/executor / approvalRequired

Function approvalRequired

packages/core/sdk/src/executor.ts:3558–3564  ·  view source on GitHub ↗
(
      annotations: ToolAnnotations | undefined,
      policy: EffectivePolicy,
    )

Source from the content-addressed store, hash-verified

3556 // Read before pre-approval arg validation so the extra validation pass
3557 // only runs for calls that would otherwise burn a user approval.
3558 const approvalRequired = (
3559 annotations: ToolAnnotations | undefined,
3560 policy: EffectivePolicy,
3561 ): boolean => {
3562 if (policy.action === "approve") return false;
3563 return policy.action === "require_approval" || annotations?.requiresApproval === true;
3564 };
3565
3566 const enforceApproval = (
3567 annotations: ToolAnnotations | undefined,

Callers 2

enforceApprovalFunction · 0.85
executeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected