fix(server): agents only see preview and device tools when their access is on

Fresh provider sessions with browser or device access disabled were offered
preview_* and device_* tools that then failed on every call. Those
registrations now carry McpSchema.EnabledWhen, which reads the request's
McpInvocationContext, so tools/list and tools/call skip a capability the
credential does not grant. Handler checks stay in place.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
a6c3bc1c8aJulius Marminge committed on 10/24/2026, 2:40:41 AMparentf8cdae1
3 files changedLine totals unavailable