PyPI version GitHub release CI License: MIT arXiv
English Version | 中文版
A protocol-agnostic tool management library for function-calling LLMs.
| Package | Description | PyPI | Docs |
|---|---|---|---|
| toolregistry | Core library — tool registration, schema generation, execution | PyPI | Docs |
| toolregistry-server | Server adapters — expose tools via OpenAPI & MCP | PyPI | Docs |
| toolregistry-hub | Ready-to-use tools — calculator, web search, file ops, etc. | PyPI | Docs |
toolregistry (core)
↓
toolregistry-server (tool server)
↓
toolregistry-hub (tool collection + server config)
- Protocol-agnostic — register tools from native Python functions/classes, MCP servers, OpenAPI specs, or LangChain tools through a unified interface
- Multi-provider schemas — generate tool schemas for OpenAI, Anthropic, and Gemini via llm-rosetta
- Concurrent execution — thread and process pool backends with per-tool timeout and concurrency control
- Permission system — tag-based policies (
READ_ONLY,DESTRUCTIVE,NETWORK, etc.) with allow/deny/ask rules - Tool metadata & tags — classify tools with
ToolTag,ToolMetadata, namespace support, and source tracking - Admin panel — built-in Web UI for monitoring tools, permissions, and runtime config (i18n: EN/ZH)
- Think-augmented calling — inject chain-of-thought reasoning into tool calls (arXiv:2601.18282)
- Declarative config — load tool sources from JSONC/YAML config files
- Zero-dependency core — HTTP client, YAML parser, JSON Schema resolver all vendored; only
pydanticandllm-rosettaas runtime deps
from toolregistry import ToolRegistry registry = ToolRegistry() @registry.register def add(a: float, b: float) -> float: """Add two numbers together.""" return a + b # Use with any LLM provider schemas = registry.get_schemas(api_format="openai-chat") # or "anthropic", "gemini" result = registry["add"](1, 2) # 3.0
See the Usage Guide for MCP, OpenAPI, LangChain integrations and more.
Requires Python >= 3.10.
pip install toolregistry # core pip install toolregistry[mcp] # + MCP support pip install toolregistry[langchain] # + LangChain support pip install toolregistry-hub # ready-to-use tools (separate package)
@software{toolregistry2025, title={ToolRegistry: A Protocol-Agnostic Tool Management Library for OpenAI-Compatible LLM Applications}, author={Peng Ding}, year={2025}, url={https://github.com/Oaklight/ToolRegistry}, note={A Python library for unified tool registration, execution, and management across multiple protocols in OpenAI-compatible LLM applications} } @article{ding2025toolregistry, title={Toolregistry: A protocol-agnostic tool management library for function-calling llms}, author={Ding, Peng and Stevens, Rick}, journal={arXiv preprint arXiv:2507.10593}, year={2025} }
MIT — see LICENSE for details.