Skip to main content
Tool Search enables progressive disclosure of tools when agents have many MCP or plugin tools, reducing context overhead and improving performance.
The user asks about Slack; tool_search discloses only the tools needed so large MCP catalogues stay out of context.

Quick Start

1

Simple Usage

Enable Tool Search with auto mode to activate progressive disclosure when needed:
2

With Configuration

Use ToolSearchConfig for fine-grained control:

How It Works

When bridge mode activates, the model sees three lightweight tools instead of potentially hundreds of MCP tool schemas:

When to Use It

Use Tool Search when:
  • Your agent connects to 10+ MCP servers
  • You have 50+ tools from plugins/integrations
  • Context window usage is a concern
  • LLM responses are slow due to large tool schemas
Skip Tool Search when:
  • You have fewer than 10 tools total
  • All tools are frequently used core operations
  • Tool discovery latency is critical

Configuration Options

Precedence Ladder

Tool Search supports multiple configuration levels:

Core vs Deferrable Tools

Core Tools (Never Defer)

These 16 essential tools always remain visible:

Deferrable Tools

  • MCP tools: Automatically marked with __praisonai_deferrable__ = True
  • Custom tools: Add deferrable: True to function metadata
  • MCP-prefixed: Tools starting with mcp_

Common Patterns

MCP-Heavy Agent

For agents with many MCP servers:

Force-On for Testing

Always use bridge mode for testing or high-tool-count scenarios:

Custom Threshold

Adjust when bridge mode activates:

Best Practices

Enable Tool Search when your agent has 10+ tools, especially from MCP servers. The auto mode intelligently activates only when tool schemas would consume significant context window space. For agents with 3–10 tools, the overhead isn’t worth the complexity.
The default 10% threshold works well for most scenarios. Lower it to 5-7% for aggressive context saving, or raise it to 15-20% if you prefer fewer bridge interactions. Monitor your context usage and adjust based on your model’s window size.
More capable models (GPT-4, Claude-3.5-Sonnet) write better tool search queries. They understand semantic relationships and can find tools by functionality rather than just name matching. Smaller models may need more explicit tool naming or descriptions.
Don’t use Tool Search for agents with fewer than 10 tools, or when all tools are frequently used core operations. The 1-2 extra round trips for cold tool access aren’t worth it for small, stable toolsets.

Trade-offs

Benefits:
  • Reduces context window usage by 60-80% for tool-heavy agents
  • Improves LLM response speed with fewer schemas to process
  • Scales to hundreds of MCP tools without context bloat
  • Auto mode provides zero overhead when not needed
Costs:
  • Cold tool access requires 1-2 extra round trips (search → describe → call)
  • tool_describe results enter conversation history, growing context
  • Bridge mode invalidates existing tool schemas between sessions
  • Smaller models may write less effective search queries

Load MCP Tools

Connect MCP servers and load their tools

Allowed Tools

Filter and control tool availability