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

Function approvalRequired

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

Source from the content-addressed store, hash-verified

4185 // Read before pre-approval arg validation so the extra validation pass
4186 // only runs for calls that would otherwise burn a user approval.
4187 const approvalRequired = (
4188 annotations: ToolAnnotations | undefined,
4189 policy: EffectivePolicy,
4190 ): boolean => {
4191 if (policy.action === "approve") return false;
4192 return policy.action === "require_approval" || annotations?.requiresApproval === true;
4193 };
4194
4195 const enforceApproval = (
4196 annotations: ToolAnnotations | undefined,

Callers 2

enforceApprovalFunction · 0.85
executeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected