Debugging

Why Your Tool Call Got Truncated

Tool arguments are generated output and count against your token limit. A call cut off mid-argument looks exactly like a model behaving badly, which is why this one wastes so much time.
16 creative tools · one MCP interface · image, video, audio and mastering

Check the stop reason before blaming the model

When an assistant starts producing malformed calls or abandoning them halfway, the natural conclusion is that the model is not good enough or the prompt is wrong. Both are usually incorrect. If the arguments are long, the response can simply run out of room.

The stop reason tells you immediately. A response that ends because it hit the maximum length is a budget problem, not a reasoning problem, and no amount of prompt rewriting will fix it. Log it on every call so the question is answered before the investigation starts.

Budget for the arguments, not just the reply

It is easy to size a token limit around the text you expect back and forget that structured arguments are generated too. A tool that takes a long string, a list, or a nested object can use more of the budget than the visible answer does. This cost real hours on an assistant running at a limit that was fine for prose and far too small for its tool calls.

Frequently Asked Questions

Why do tool calls get cut off?

Tool arguments are generated output and count against the token limit. A long argument can exhaust the budget mid-call, which looks like the model misbehaving.

How do I diagnose it?

Log the stop reason on every call. If it indicates the maximum length was reached, it is a budget problem and prompt changes will not fix it.

Give your agent real tools

AetherWave runs an MCP server exposing 16 creative tools across image, video, audio and mastering, callable from any compatible AI client without a bespoke integration.

Explore the MCP server