Tool Configurations

View as Markdown

Tool configurations define how LLM columns access external tools during generation. Each ToolConfig specifies which MCP providers to use, which tools are allowed, and operational limits.

Overview

A ToolConfig connects LLM columns to MCP providers. When you create column configurations (like LLMTextColumnConfig or LLMCodeColumnConfig), you reference a tool configuration by its alias. Data Designer uses the tool configuration to determine which tools are available and how to manage tool calls.

ToolConfig Structure

The ToolConfig class has the following fields:

FieldTypeRequiredDescription
tool_aliasstrYesUnique identifier for this tool configuration (referenced by columns)
providerslist[str]YesList of MCP provider names to use (can reference multiple providers)
allow_toolslist[str]NoRestrict to specific tools (None = allow all tools from providers)
max_tool_call_turnsintNoMaximum tool-calling iterations (default: 5)
timeout_secfloatNoPer-call timeout in seconds (default: 60.0)

Examples

Basic Tool Configuration

1import data_designer.config as dd
2
3tool_config = dd.ToolConfig(
4 tool_alias="my-tools",
5 providers=["demo-mcp"],
6)

Restricting Allowed Tools

1import data_designer.config as dd
2
3tool_config = dd.ToolConfig(
4 tool_alias="search-only",
5 providers=["demo-mcp"],
6 allow_tools=["search_docs", "list_docs"], # Only these tools allowed
7)

Using Multiple Providers

A single ToolConfig can reference multiple MCP providers, allowing tools to be drawn from different sources:

1import data_designer.config as dd
2
3tool_config = dd.ToolConfig(
4 tool_alias="multi-search",
5 providers=["doc-search-mcp", "web-search-mcp"],
6 allow_tools=["search_docs", "search_web", "list_docs"],
7 max_tool_call_turns=10,
8)

When the model requests a tool call, Data Designer automatically finds which provider hosts that tool and routes the call appropriately.

Setting Operational Limits

1import data_designer.config as dd
2
3tool_config = dd.ToolConfig(
4 tool_alias="limited-tools",
5 providers=["demo-mcp"],
6 max_tool_call_turns=3, # Maximum 3 tool-calling iterations
7 timeout_sec=30.0, # 30 seconds per tool call
8)

Adding to Config Builder

Tool configurations can be added to the config builder in two ways:

1import data_designer.config as dd
2
3tool_config = dd.ToolConfig(
4 tool_alias="my-tools",
5 providers=["demo-mcp"],
6)
7
8# Method 1: Pass at initialization
9builder = dd.DataDesignerConfigBuilder(tool_configs=[tool_config])
10
11# Method 2: Add later
12builder = dd.DataDesignerConfigBuilder()
13builder.add_tool_config(tool_config)

Understanding Turn-Based Limiting

The max_tool_call_turns parameter limits how many tool-calling iterations (turns) are permitted, not the total number of individual tool calls.

Turn-based vs call-based counting A turn is one iteration where the LLM requests tool calls. With parallel tool calling, a single turn may execute multiple tools simultaneously.

For example, if the model requests 3 tools in parallel, that counts as 1 turn, not 3. This gives models flexibility to use parallel calling efficiently while still bounding total iterations.

When the turn limit is reached, Data Designer gracefully refuses additional tool calls rather than failing abruptly. The model receives feedback explaining the limit was reached and can produce a final response based on the tools it already called.

See Also