This guide covers the safety controls available for tool use, including allowlists, turn budgets, and timeouts. These controls help prevent runaway loops and ensure predictable generation behavior.
When LLM columns use tools, the model can make multiple tool calls in a loop until it produces a final answer. Without limits, this could lead to:
Data Designer provides three types of controls:
Restrict which tools are available using allow_tools:
Tools not in the allowlist won’t be included in the schemas sent to the model, so the model won’t know they exist.
Use allowlists for untrusted tools If your MCP providers expose tools that could be dangerous or expensive, use allowlists to restrict access to only the tools you need.
Limit the number of tool-calling iterations using max_tool_call_turns:
A turn is one iteration where the LLM requests tool calls. With parallel tool calling, a single turn may execute multiple tools simultaneously.
This approach gives models flexibility to use parallel calling efficiently while still bounding total iterations.
When the turn limit is reached, Data Designer doesn’t abruptly stop generation. Instead:
This ensures the model can still provide a useful answer based on the tools it already called, rather than failing silently.
Limit how long each tool call can take using timeout_sec:
When a timeout occurs:
The default timeout is 60 seconds. Adjust based on your tools:
You can use all controls together for defense in depth: