ToolTweak: An Attack on Tool Selection in LLM-based Agents
Jonathan Sneh 1,2, Ruomei Yan 2, Jialin Yu 1,2, Philip Torr 1, Yarin Gal 1, Sunando Sengupta 2, Eric Sommerlade 2, Alasdair Paren 1, Adel Bibi 1
Published on arXiv
2510.02554
Insecure Plugin Design
OWASP LLM Top 10 — LLM07
Prompt Injection
OWASP LLM Top 10 — LLM01
Key Finding
ToolTweak raises a targeted tool's selection rate from a ~20% baseline to as high as 81%, with strong cross-model transferability between open-source and closed-source LLMs.
ToolTweak
Novel technique introduced
As LLMs increasingly power agents that interact with external tools, tool use has become an essential mechanism for extending their capabilities. These agents typically select tools from growing databases or marketplaces to solve user tasks, creating implicit competition among tool providers and developers for visibility and usage. In this paper, we show that this selection process harbors a critical vulnerability: by iteratively manipulating tool names and descriptions, adversaries can systematically bias agents toward selecting specific tools, gaining unfair advantage over equally capable alternatives. We present ToolTweak, a lightweight automatic attack that increases selection rates from a baseline of around 20% to as high as 81%, with strong transferability between open-source and closed-source models. Beyond individual tools, we show that such attacks cause distributional shifts in tool usage, revealing risks to fairness, competition, and security in emerging tool ecosystems. To mitigate these risks, we evaluate two defenses: paraphrasing and perplexity filtering, which reduce bias and lead agents to select functionally similar tools more equally. All code will be open-sourced upon acceptance.
Key Contributions
- ToolTweak: an iterative, LLM-feedback-based attack that automatically optimizes tool names and descriptions to bias agent tool selection from ~20% to 81% selection rate
- Demonstrates distributional shifts in tool usage across tasks, revealing fairness and competition risks in tool marketplaces and MCP ecosystems
- Evaluates paraphrasing and perplexity-filtering defenses that reduce selection bias, and shows strong attack transferability between open-source and closed-source LLMs