Why did my agent call the wrong tool with invented arguments?

The model matched your request to whichever tool’s description sounded closest, then, having decided a tool was needed, filled in an argument it did not actually have with a plausible-looking guess instead of stopping to ask. Both failures trace to the same cause: tool calling gives the model no way to say it is unsure, only a schema to fill in, so a low-confidence match and a high-confidence one produce an identical-looking call. Vague or overlapping tool descriptions make the wrong-tool half worse, since the model is choosing on the text of the description, not the code behind it. Missing or ambiguous context earlier in the conversation makes the invented-argument half worse, since the model has a slot to fill and nothing real to put in it.

The fix lives in the tool definitions more than in the model: names and descriptions specific enough that no two tools plausibly match the same request, and required arguments the model can only get from context that is actually present.

keep reading

More on this.

Send us the traces you already emit.