The local `from datetime import datetime, timezone as _tz` inside execute_tool() shadowed the module-level datetime import for the entire function scope, causing UnboundLocalError in all calendar tool handlers (list_events, create_event, update_event). Fixed by importing only timezone as _tz — datetime is already available at module level. Also removes the now-unnecessary noqa: F823 suppression. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>