function consentGatesFigure(host) { ensureStyles(); var shell = document.createElement('div'); shell.className = 'mf-shell'; shell.innerHTML = [ '
Consent and Least Privilege one tools/call, two independent gates before it runs
', '
', '', '', '', '', '', '', '', 'tools/call', 'client sends', '', 'scope check', '403 if short', '', 'consent check', 'input_required', '', 'tool runs', 'isError: false', '', '', 'scope ok', '', 'consent ok', '', '403: union + retry', '', 'no consent: elicit, retry', '', '
', '
A tools/call meets the scope gate first: insufficient scope comes back as HTTP 403, and the client retries with the union of its old and newly challenged scopes, capped at a few attempts. Only once scope clears does the call meet the consent gate: a tool needing approval comes back input_required, and the client retries after an elicitation round trip. Either gate can turn a call away on its own.
' ].join(''); host.appendChild(shell); } // register as: mcpa-25-consent-gates