ToolTweak: An attack on tool selection in LLM agentsToolTweak: An Attack on Tool Selection in LLM-based Agents
Translation in progress — untranslated text is omitted.
The paper proposes ToolTweak, a lightweight automatic attack that influences LLM agent tool selection by iteratively tampering with tool names and descriptions, increasing the selection rate of the attacked tool from a baseline of about 20% to up to 81%. The attack transfers strongly between open-source and closed-source models and causes a shift in the tool usage distribution, involving fairness, competition, and security issues in the tool ecosystem. The authors evaluate two defenses—paraphrasing and perplexity filtering—both of which reduce the bias and make agents select functionally similar tools more evenly.
- LLM agents select tools based almost entirely on names, descriptions, and parameter schemas. Providers in a marketplace can rewrite names and descriptions to make agents repeatedly favor their tool across different queries, which the authors argue relates to fairness, competition, and security.
- ToolTweak iteratively modifies the target tool's name and description based on selection rate feedback from the attack model, with the parameter schema unchanged. 10 rounds by default, no gradients, no separate reviewer model. Paraphrasing is used to mitigate bias, and gpt2-large's perplexity is used to attempt filtering before entry into the library.
- On the ToolBench subset, Table 1's ToolTweak BSR: DeepSeek 81.6, Llama 3.1 34.0. Grok 3 Mini manual suffix 89.5. Paraphrasing lowers selection rate; the authors say perplexity thresholds cannot separate them.
- The conclusion proposes future work on larger dynamic tool libraries, retrieval systems, and white-box gradient attacks, and states that more robust defenses are needed. The experiments cover 6 main models, a ToolBench subset, and two defenses, paraphrasing and perplexity; the paper does not report the number of repetitions or significance tests for the main selection rates.