Overview
Meta Tools enable your TypeScript agents to:- Discover tools based on natural language queries
- Execute tools dynamically without knowing their names in advance
- Explore capabilities of connected integrations
- Adapt behavior based on available tools
Main Concepts: For conceptual information about Meta Tools and how they work, see the Meta Tools Introduction. This page focuses on TypeScript-specific implementation details.
Getting Meta Tools
Complete TypeScript Examples: View the full implementation with all TypeScript-specific patterns in our Meta Tools TypeScript Example.
Available Meta Tools
Search Tools
Find relevant tools based on natural language queries:query
(string): Natural language description of what you want to dolimit
(number): Maximum number of tools to return (default: 10)minScore
(number): Minimum relevance score (0-1, default: 0.1)
Execute Tool
Execute any tool dynamically by name:toolName
(string): Name of the tool to executeparams
(object): Parameters to pass to the tool
Describe Tool
Get detailed information about a specific tool:List Tools
Get a list of all available tools:Framework Integration
OpenAI Functions
Complete OpenAI Example: See the full OpenAI integration with proper error handling and multi-turn conversations in openai-integration.ts.
Vercel AI SDK
Complete AI SDK Example: See the full Vercel AI SDK integration with streaming and tool execution in ai-sdk-integration.ts.
TypeScript-Specific Patterns
Type-Safe Tool Execution
TypeScript enables type-safe meta tool usage with proper interface definitions:Async/Await Patterns
Meta tools work seamlessly with modern TypeScript async patterns:Error Handling Patterns
Complete TypeScript Examples: See comprehensive TypeScript implementation patterns including:
Best Practices
- Cache Tool Metadata: Store tool descriptions to avoid repeated API calls
- Handle Failures Gracefully: Meta tools may fail if integrations are unavailable
- Use Appropriate Filters: Set reasonable
minScore
andlimit
values - Validate Parameters: Always validate parameters before executing tools
- Monitor Usage: Meta tools count toward your API usage limits
Limitations
- Beta Status: API may change in future versions
- Performance: Tool discovery adds latency compared to direct tool calls
- Accuracy: Search results depend on tool metadata quality
- Rate Limits: Subject to the same rate limits as regular tools