How Do Agentic LLMs Decide to Call Tools? A Tool-Call Vector Shaped by Suppression

Xijie Gong, Tingxu Han, Jiahao Zhang, Wei Song, Ziqi Ding, Hanqi Yan, Youcheng Sun, Lijie HuNeurIPS 2026

TL;DR

When an AI agent decides to run a Python script instead of just chatting with you, you might assume your command actively pushes an internal "use tool" button. In reality, the bulky system prompt puts the model on a hair-trigger default to call tools, and non-action words (like discuss) actively suppress that urge. By isolating this decision to a single compact vector inside the model, researchers found they can toggle tool use on and off at will across completely different tasks and multi-turn conversations.

What Problem Does This Paper Address?

Modern AI agents rely on "tool calling"—deciding when to pause text generation and invoke an external API, search engine, or code interpreter. While we have plenty of benchmarks grading how well models pick tools, we haven't known how they internally make the binary "call-or-no-call" decision in the first place.

Studying this via mechanistic interpretability (reverse-engineering neural network internals) is notoriously tricky. Standard interpretability techniques love short, clean, 15-token prompts where you can change one word and watch how internal activations shift. Agentic prompts, however, are messy monsters: hundreds of tokens of role instructions, JSON schemas, and formatting templates all tangled up with the user’s request. Finding a clean, controllable knob to turn in that sea of tokens has been a major roadblock.

Methods

The authors introduce a remarkably clean experimental setup to tame long agentic prompts, then apply standard mechanistic interpretability tools to trace the internal circuit:

Figure 1: Roadmap of the paper’s mechanistic analysis. The three numbered blocks summarize the stages of our analysis: (1) verb substitution turns long agentic prompts into a controlled causal interface; (2) the call-or-no-call decision passes through a tool-call vector, µ∆, that is causally sufficient and necessary; and (3) this vector reflects suppression of a scaffold-induced tool-call default and generalizes across the model families. The six lettered steps show how the evidence is built.
  • A One-Word Causal Interface (Novel Setup): Because models like Qwen3 announce tool use with a special first token (<tool_call>), the entire decision boils down to predicting token #1. The authors keep the massive prompt scaffold and coding task completely fixed, swapping only a single verb in the user's request—e.g., changing an execution verb like write ("clean" prompt) to an analysis verb like discuss ("corrupt" prompt). This single word reliably flips the output from <tool_call> to plain text.
  • Activation Patching & Vector Extraction: Using Qwen3-8B as their primary testbed, they swap internal activations from "write" runs into "discuss" runs layer by layer to find exactly where the decision crystallizes (Layer 24, at the final prompt token). Averaging the difference between execution and analysis activations at this spot yields a single direction in activation space: the tool-call vector ($\mu_\Delta$).
  • Transcoder Decomposition & Readout Tracing: To see how $\mu_\Delta$ is built, they use Transcoders—interpretable sparse autoencoders that break opaque MLP (multi-layer perceptron) layers down into human-readable features. Finally, they use Direct Logit Attribution (DLA) to see which downstream attention heads and MLP features read $\mu_\Delta$ to actually output <tool_call>.

Datasets

  • Contrastive Discovery Pairs (New): 500 behaviorally filtered paired coding prompts per model (300 for analysis, 200 held out for testing) spanning Python, Java, and C++, built from MBPP, APPS, HumanEval, and CodeContests.
  • Generalization Suites (New & Existing): 300 held-out prompt pairs across web search, SQL execution, and email dispatch; 600 newly constructed "verb-free" implicit requests (e.g., "I haven't gotten to... yet"); and $\tau^2$-Bench Telecom, an existing benchmark featuring long (5,385–15,690 tokens), multi-turn agent trajectories with 16–43 available tools.

Key Insights and Ideas

  • Tool calling is the default; chatting takes effort: Prompt ablations reveal that the formatting template in the system prompt installs a near-100% prior to call tools whenever a task is present, while the tool schema makes that prior sensitive to wording.
  • The vector is shaped by suppression: Looking inside the "formation window" (Layers 20–23), MLPs do 77.7% of the heavy lifting. Surprisingly, execution verbs (write, build) don't fire strong "go call a tool!" features—they mostly leave the scaffold's default prior alone. Instead, analysis verbs (discuss, explore) strongly activate suppressor features signaling that tool use is unnecessary, pushing against the tool-call direction. Structurally, this mirrors how safety "refusal" vectors work in LLMs.
Figure 4: MLPs dominate formation-window writes. Left, Qwen3-8B component outputs projected onto ˆµ∆. Right, the Transcoder architecture used to decompose MLP writes.
  • Downstream "scaffold-reading" heads: Once $\mu_\Delta$ is set at Layer 24, specific late attention heads respond to it by shifting their attention away from general role instructions and locking onto the tool-format template, while late MLP features trigger the <tool_call> syntax.

Key Results

  • 100% Bidirectional Control: In Qwen3-8B, adding $\mu_\Delta$ at Layer 24 flips held-out analysis prompts from 0% to 100% tool calling; subtracting it drops execution prompts from 100% to 0%.
  • Zero-Shot Transfer to the Wild: Taking the exact coding-derived vector from Qwen3-8B without re-estimating it:
  • Across web search, SQL, and email tasks (with norm calibration), it achieves 100% induction and 100% suppression.
  • On implicit, verb-free requests, subtracting $\mu_\Delta$ suppresses 93.1% of native tool calls (reaching 100% at $1.5\times$ strength).
  • Inside messy, multi-turn $\tau^2$-Bench conversations, adding $\mu_\Delta$ induces tool calls on 70.0% of text turns, while subtracting it suppresses 36.7% of native calls.
  • Cross-Model Universality: Across 7 models (Qwen3-4B/8B/14B, Qwen3.5-4B/9B, Mistral-Small-3.2-24B, and Granite-3.3-8B), patching the localized layer recovers 93.5%–100% of tool calls, and suppressive corrupt-side features outweigh clean-side features ($K_{\text{corrupt}} > K_{\text{clean}}$) in every single model.

Limitations and Future Work

  • Initiation vs. Execution: The study only explains the binary decision to start a tool call at the first token. It doesn't evaluate whether an induced call picks the right tool, writes valid JSON arguments, or actually solves the user's problem.
  • Fine-Grained Circuitry: While the authors isolate the scaffold prior and broad suppressor feature families, the exact token-by-token circuit that binds tool schemas to user semantics in earlier layers isn't yet fully mapped. Furthermore, while implicit requests reuse the Layer 24 vector, they may form it differently upstream than explicit verbs do.

Summary updated

Abstract

Tool calling, invoking external tools on demand, is central to agentic LLMs, yet the mechanism that decides whether a model calls a tool or responds directly remains poorly understood. Agentic prompts are long and heavily scaffolded, combining role instructions, tool schemas, format templates, and the user's request across hundreds of tokens, creating a noisy, highly entangled context in which no single controllable variable for mechanistic analysis is obvious. To obtain such a variable, we propose a method that converts complex agentic prompts into minimal contrastive pairs in which a single request verb determines the tool-call decision: replacing an execution-verb (e.g., \textit{write}) with an analysis-verb (e.g., \textit{discuss}) reliably flips the decision, suggesting it is mediated by a compact internal state. We construct 500 such paired prompts across Python, Java, and C++ (300 for mechanistic analysis, 200 held out for evaluation). We trace the decision to a vector, $\mu_\Delta$, that is both causally necessary and sufficient and generalizes beyond the discovery prompts to native multi-turn $\tau^2$-Bench trajectories and verb-free requests. Behavioral ablations show that the scaffold establishes a tool-call prior; Transcoder decomposition then reveals that analysis verbs suppress this prior through features signaling that tool use is unnecessary, whereas execution verbs largely leave it intact. Downstream scaffold-reading attention heads and MLP features read out the resulting state, and the same mechanism recurs across seven models from the Qwen, Mistral, and Granite families. Our code is available at \url{https://github.com/XijieGo/MI4ToolCalling}.
BibTeX
@inproceedings{gong2026how,
  author = {Xijie Gong and Tingxu Han and Jiahao Zhang and Wei Song and Ziqi Ding and Hanqi Yan and Youcheng Sun and Lijie Hu},
  title = {{How Do Agentic LLMs Decide to Call Tools? A Tool-Call Vector Shaped by Suppression}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2026},
  url = {https://openreview.net/forum?id=vBXDOH5EqA},
}
Figure