mlsanityData to 14 Oct 2026

Tool Specifications Matter: Uncovering and Mitigating Safety Risks in AI Agents

arXiv 2607.29254 ↗First posted 31 Jul 2026cs.AIcited by 1

On the map: LLM agents and tool use → Agent threats, guardrails and governance

also in 1 more
Abstract (arXiv)

AI agents extend large language models (LLMs) with external tools, enabling them to perform complex tasks and translate model outputs into consequential real-world actions. Yet LLMs often become substantially less safe when deployed as agents, and the source of this degradation remains poorly understood. In this paper, we identify schema-formatted tool specifications as a primary source of agent safety degradation and show, through white-box representation analysis, that they weaken the model's internal refusal signals and contribute to unsafe tool execution. Building on this finding, we propose SafeKeep, an inference-time safeguard that decouples safety judgment from tool execution: it assesses requests using flattened textual tool specifications while retaining the original schema-formatted specifications for execution. Across two representative benchmarks and four LLMs, including both white-box and black-box models, SafeKeep increases the average refusal rate for harmful requests from 23.8% to 70.6% and reduces the average attack success rate under observation-level prompt injection from 25.6% to 2.5%. It also outperforms existing safeguards and preserves task-handling capability. We release the code and data at https://github.com/snowcatsmoking/SafeKeep .

Key facts. Cited by 1 paper in the map (data through 14 Oct 2026). Placed in Agent threats, guardrails and governance, one of 16 directions in LLM agents and tool use. Builds on 33 of its 39 references that are in the map. First posted on arXiv 31 Jul 2026.

Builds on

33 of 39 references.

Closest ancestors · 7

Same direction, newest first

  1. 2025When Refusals Fail: Unstable Safety Mechanisms in Long-Context LLM Agents2 Dec
  2. 2025AgentAlign: Navigating Safety Alignment in the Shift from Informative to Agentic Large Language Models29 May
  3. 2025Unveiling Privacy Risks in LLM Agent Memory17 Feb
  4. 2024AgentHarm: A Benchmark for Measuring Harmfulness of LLM Agents11 Oct
  5. 2024InjecAgent: Benchmarking Indirect Prompt Injections in Tool-Integrated Large Language Model Agents5 Mar
  6. 2024R-Judge: Benchmarking Safety Risk Awareness for LLM Agents18 Jan
  7. 2023Identifying the Risks of LM Agents with an LM-Emulated Sandbox25 Sep

Other references · 26

  1. 2024The Llama 3 Herd of Modelscited by 14,715
  2. 2025Qwen3 Technical Reportcited by 8,820
  3. 2022ReAct: Synergizing Reasoning and Acting in Language Modelscited by 8,695
  4. 2022Constitutional AI: Harmlessness from AI Feedbackcited by 3,050
  5. 2019HuggingFace's Transformers: State-of-the-art Natural Language Processingcited by 2,218
  6. 2023WebArena: A Realistic Web Environment for Building Autonomous Agentscited by 2,006
  7. 2023ToolLLM: Facilitating Large Language Models to Master 16000+ Real-world APIscited by 1,947
  8. 2021WebGPT: Browser-assisted question-answering with human feedbackcited by 1,745
  9. 2023AgentBench: Evaluating LLMs as Agentscited by 1,267
  10. 2024Refusal in Language Models Is Mediated by a Single Directioncited by 1,032
  11. 2025OpenAI GPT-5 System Cardcited by 989
  12. 2023API-Bank: A Comprehensive Benchmark for Tool-Augmented LLMscited by 591
14 more
  1. 2024Executable Code Actions Elicit Better LLM Agentscited by 564
  2. 2024WildGuard: Open One-Stop Moderation Tools for Safety Risks, Jailbreaks, and Refusals of LLMscited by 496
  3. 2023Detecting Language Model Attacks with Perplexitycited by 431
  4. 2023Auto-GPT for Online Decision Making: Benchmarks and Additional Opinionscited by 255
  5. 2024SORRY-Bench: Systematically Evaluating Large Language Model Safety Refusalcited by 240
  6. 2024GTA: A Benchmark for General Tool Agentscited by 77
  7. 2025SafeSwitch: Steering Unsafe LLM Behavior via Internal Activation Signalscited by 29
  8. 2021Do Syntactic Probes Probe Syntax? Experiments with Jabberwocky Probingcited by 28
  9. 2025SAFEPATH: Preventing Harmful Reasoning in Chain-of-Thought via Early Alignmentcited by 24
  10. 2025How Post-Training Reshapes LLMs: A Mechanistic View on Knowledge, Truthfulness, Refusal, and Confidencecited by 12
  11. 2026Mechanistic Data Attribution: Tracing the Training Origins of Interpretable LLM Unitscited by 10
  12. 2024Length-Induced Embedding Collapse in PLM-based Modelscited by 9
  13. 2026Streaming Hallucination Detection in Long Chain-of-Thought Reasoningcited by 5
  14. 2026Safety Recovery in Reasoning Models Is Only a Few Early Steering Steps Awaycited by 3

Built on by

Cited by year (2026 to 14 Oct)

Citing papers per year: 2026: 1.

1 paper.

Similar, not cited

Close in wording, no citation either way

  1. 2026SafeClawBench: Separating Semantic, Audit-Evidence, and Sandbox Harm in Tool-Using LLM Agents
  2. 2026AgentBoundary: Counterfactual Evaluation of Safety in Tool-Using LLM Agents
  3. 2026Boiling the Frog: A Multi-Turn Benchmark for Agentic Safety
  4. 2026Mind the GAP: Text Safety Does Not Transfer to Tool-Call Safety in LLM Agents
  5. 2026BLINDSPOT: A Benchmark for Safety and Refusal Calibration in Long-Horizon Tool-Using Agents
  6. 2025AgentGuard: Repurposing Agentic Orchestrator for Safety Evaluation of Tool Orchestration
  7. 2026Operational Hallucination and Safety Drift in AI Agents
  8. 2026The Causal Impact of Tool Affordance on Safety Alignment in LLM Agents