What Does Tool Manager Do?
Tool Manager helps you:- Register tools (functions or Tool objects) with automatic metadata extraction
- Organize tools using tags for easy grouping and discovery
- Retrieve tools by name for dynamic access
- Validate arguments and handle errors before execution
- Execute tools, supporting both sync and async functions
- List tools in multiple formats (OpenAI, LangChain, MCP) for interoperability
Key Features
- Flexible Registration: Add tools as functions or Tool objects. Metadata and type hints are automatically extracted.
- Comprehensive Lookup: Retrieve tools by unique name. Get clear errors if a tool is missing.
- Format Conversion: Export tools in OpenAI, LangChain, or MCP format for use in different frameworks.
- Tag-Based Organization: Assign tags to group related tools (e.g., “math”, “text”).
- Validation & Error Handling: Uses Pydantic for argument validation and provides informative error messages.
- Sync & Async Support: Works with both synchronous and asynchronous tool functions.
Example: Registering and Using Tools
Listing Tools in Different Formats
You can export all registered tools in the format required by your integration:Organizing Tools with Tags
Tags help you group and filter tools:Best Practices
- Use clear, unique names for tools
- Write detailed docstrings and use type hints
- Handle errors gracefully in your tool functions
- Use tags to organize related tools