---
title: "Discussion on \"AI agent tool calling: designing tools the model will actually use correctly\" | Hashnode"
description: "Discussion on \"AI agent tool calling: designing tools the model will actually use correctly\". When an agent picks the wrong tool or passes garbage arguments, the problem is usually the tool, not the model"
url: "https://hashnode.com/posts/ai-agent-tool-calling-designing-tools-the-model-will-actually-use-correctly/6ad0d1e8865ce90870b8c7fe"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [AI agent tool calling: designing tools the model will actually use correctly](https://amitshuklabag.hashnode.dev/ai-agent-tool-calling-designing-tools-the-model-will-actually-use-correctly?utm_source=hashnode&utm_medium=feed)

When an agent picks the wrong tool or passes garbage arguments, the problem is usually the tool, not the model

Oct 15 · 9 min read · amitshuklabag.hashnode.dev  
Read the article

-   [#ai](https://hashnode.com/tag/ai)
-   [#llm](https://hashnode.com/tag/llm)
-   [#ai-agents](https://hashnode.com/tag/ai-agents)
-   [#software-engineering](https://hashnode.com/tag/software-engineering)

## Written by

[Amit Shukla](https://hashnode.com/@amitshuklabag)

@amitshuklabag · India

  
[View profile](https://hashnode.com/@amitshuklabag)

Software Engineer · DevOps & Platform Engineering · Applied AI

I build and operate platforms, and I write about what actually breaks. Docker, Kubernetes, Linux, Node.js, and applied AI (RAG, agents, MCP). Weekly deep dives here. Daily tips on Instagram @amitshuklabag.

## Responses 1

Markdown supported · ⌘↵ to post

[Mihai\_LeanZero](https://hashnode.com/@mihaileanzero)

[Oct 15](https://hashnode.com/posts/ai-agent-tool-calling-designing-tools-the-model-will-actually-use-correctly/6ad0d1e8865ce90870b8c7fe/comment/6ad0dc81afbfd10d12159349)

The errors-are-instructions section is the part I'd underline. One thing I'd add next to the "Do not retry" message: that text is still only a request, and a model will occasionally retry anyway, so I'd back it with a counter in the loop that refuses a third identical call (same tool, same arguments) and returns a fixed "this exact call already failed twice" result. I'd also give the error object a retryable field of its own instead of leaving it to the prose, since a timeout and a not\_found need opposite instructions and the model shouldn't have to infer which one it got from the wording.
