TroubleshootingIntermediate

How to stop Claude from calling tools when it should not

Fix overtriggering by softening aggressive prompt language and tuning effort instead of adding more guardrails.

7 minIntermediate

On recent Claude models a common surprise is the model calling a tool too often, like spawning a search or a subagent for something it could answer directly. The usual cause is prompt language written for older, more reluctant models. Newer models follow instructions much more literally, so all-caps demands now overtrigger. The fix is to dial the language back, not to pile on more rules.

  • Access to the system prompt and tool descriptions
  • An example request where the wrong tool fired
  • The Anthropic SDK to re-test after each change

Step 1: Find the aggressive instructions

Scan your system prompt and tool descriptions for phrasing meant to overcome old reluctance. Lines like CRITICAL: you MUST use this tool, or default to using the tool, or if in doubt use the tool, now cause overtriggering.

Editor — system prompt before
Explorer
system_prompt.txt
tools.json
system_prompt.txt
1CRITICAL: You MUST call the search tool on every question.
2Default to using search. If in doubt, search.
These phrasings push newer models to overuse the tool.

Step 2: Soften the language

Replace the demands with plain, conditional guidance that states when the tool applies. Describe the trigger condition rather than ordering the model to always act.

Editor — system prompt after
Explorer
system_prompt.txt
tools.json
system_prompt.txt
1Use the search tool when the answer depends on current information
2not already in the conversation. Otherwise answer directly.
Conditional, calm phrasing lets the model use judgment.

Step 3: Put the trigger in the tool description

The tool's own description is a strong lever. Make it prescriptive about when to call, not just what it does. This gives measurable lift on whether the model reaches for the right tool at the right time.

tools.json
{
  "name": "search",
  "description": "Search the web. Call this only when the user asks about current prices, recent events, or anything not already present in the conversation.",
  "input_schema": {
    "type": "object",
    "properties": { "query": { "type": "string" } },
    "required": ["query"]
  }
}
Tune effort if it overthinks
If the model explores or spawns subagents more than you want, lower output_config.effort before adding prose constraints. Medium is often the sweet spot. Raise it back only when a task genuinely needs deeper reasoning.

Step 4: Re-test on the failing case

Run the exact request that misfired. The model should now answer simple questions directly and reserve the tool for cases that actually need it.

Agent transcript — after the fix
You
What is the capital of France?
Agent
Paris.
A factual recall question is answered directly, no needless search.

Result: after replacing the all-caps demands with conditional guidance and moving the trigger into the tool description, the assistant stopped firing a web search on trivial questions and only searched when the answer genuinely required fresh data.

Watch related tutorials

Tags
#tools#prompting#claude#agents