Typed tool catalogue for LLM agents. Register, discover, validate, and export tools to Anthropic/OpenAI format. Zero dependencies.
pip install tool-registryfrom tool_registry import ToolRegistry
registry = ToolRegistry()
@registry.register(tags=["search", "web"])
def web_search(query: str, max_results: int = 5) -> str:
"""Search the web for information.
Args:
query: The search query to execute.
max_results: Maximum number of results to return.
"""
...
# Export to Anthropic format — ready for client.messages.create()
tools = registry.to_anthropic()
# Export to OpenAI format
tools = registry.to_openai()
# Discover by capability
search_tools = registry.find("search")
web_tools = registry.by_tag("web")
# Call a tool
result = registry.call("web_search", query="UK AI regulation 2026")Auto-inferred from your function signature:
- Parameter types (
str,int,float,bool,list,dict) - Required vs optional (based on defaults)
- Descriptions (from docstring Args section)