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

Function approvalRequired

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

Source from the content-addressed store, hash-verified

6362 // Read before pre-approval arg validation so the extra validation pass
6363 // only runs for calls that would otherwise burn a user approval.
6364 const approvalRequired = (
6365 annotations: ToolAnnotations | undefined,
6366 policy: EffectivePolicy,
6367 ): boolean => {
6368 if (policy.action === "approve") return false;
6369 return policy.action === "require_approval" || annotations?.requiresApproval === true;
6370 };
6371
6372 const enforceApproval = (
6373 annotations: ToolAnnotations | undefined,

Callers 2

enforceApprovalFunction · 0.85
executeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected