Meta tools are currently in beta and may change in future versions. They provide powerful dynamic capabilities for AI agents that can discover and execute tools based on natural language queries.
Meta tools enable AI agents to dynamically discover and execute the right tools without hardcoding tool names. This is particularly useful for building flexible AI assistants that can handle various user requests intelligently.

Architecture Overview

Meta tools consist of two main functions:
  • meta_search_tools: Searches for relevant tools based on natural language queries using BM25 semantic search
  • meta_execute_tool: Executes discovered tools with the provided parameters

How It Works

Benefits

  • Dynamic Discovery: No need to hardcode tool names or maintain static lists
  • Multi-Tenant Ready: Agents adapt to available integrations per customer
  • Natural Language: Search tools using descriptive queries
  • Intelligent Routing: BM25 algorithm finds the most relevant tools automatically

TypeScript Implementation

In the TypeScript SDK, meta tools are implemented using:
  • Orama Database: Fast in-memory search index for tool discovery
  • BM25 Algorithm: Statistical ranking function for relevance scoring
  • Native TypeScript Types: Full type safety for tool parameters and responses

Advanced Use Cases

Multi-Step Workflows

Chain tool discovery and execution for complex business processes:
  1. Discovery Phase: Find tools matching user intent
  2. Validation Phase: Check tool availability and parameters
  3. Execution Phase: Run the selected tool with user data
  4. Follow-up Phase: Discover and execute additional tools based on results

Dynamic Agent Routing

Build agents that adapt their behavior based on available integrations. The agent automatically discovers what’s possible for each customer and routes user requests to the most appropriate tools.

Custom Tool Selection

Implement sophisticated tool selection logic by applying business rules to filter tools based on score thresholds, naming patterns, and operation types.

Next Steps