Why is ChatGpt calling my app two times

I have a mcp tool which gets called two times even when i only one permission modal is opened and in chatgpt too we could see only one tool call happening

Hi Soham,
This is a known issue. Fortunately there is a workaround:

Hi, thanks for the solution—this was a frustrating problem until then.

@Ben_McFarlin can we request the ChatGPT team to implement this functionality natively? It would be great for the whole community. Ideally, everyone shouldn’t have to debug the same issue and implement different caching approaches just to get it working for ChatGPT specifically. This doesn’t seem to be an issue with Claude.

A prompt reply would be appreciated.

@MAYANK_GARG Thrilled to hear the solution worked! :rocket:

While I agree this ideally shouldn’t be required, I actually view it as a necessary architectural resilience layer. We often operate under the assumption that LLM tool usage is deterministic—that the model triggers a function once and proceeds. However, in a probabilistic system, that assumption is a liability.

If we build apps that rely on the model being perfect, they break the moment the model behaves unexpectedly. What if this occurs on another platform? What if a network glitch causes a retry? If the tool call is destructive (e.g., deleting a database entry or processing a payment), relying on the model to behave perfectly is a risk.

By implementing this check on the server side, you are decoupling your application’s stability from the model’s behavior. This kind of defensive programming ensures that even if the LLM makes duplicate calls, your system handles them gracefully. This should absolutely be a standard design pattern for building robust MCPs.

2 Likes

Appreciate your thoughts on this @Ben_McFarlin
I have lots to discuss on this but may be sometime later.

Let’s keep building. Now is the time. :rocket:

1 Like