Defensive Design Against Prompt Injection and Unsafe Tool Use