ToolRegistry: A Protocol-Agnostic Tool Management Library for Function-Calling LLMs (OpenAI, Anthropic, Gemini, LangChain, MCP)
Project description
ToolRegistry
A protocol-agnostic tool management library for function-calling LLMs.
Ecosystem
| Package | Description | PyPI | Docs |
|---|---|---|---|
| toolregistry | Core library — tool registration, schema generation, execution | Docs | |
| toolregistry-server | Server adapters — expose tools via OpenAPI & MCP | Docs | |
| toolregistry-hub | Ready-to-use tools — calculator, web search, file ops, etc. | Docs |
graph LR
Hub["toolregistry-hub<br/><i>Ready-to-use tool implementations</i>"]
Server["toolregistry-server<br/><i>OpenAPI & MCP protocol adapters</i>"]
Core["toolregistry<br/><i>Tool registration, schema generation, execution</i>"]
Hub --> Server --> Core
Features
- 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
Quick Start
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.
Installation
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)
Citation
@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},
journal={arXiv preprint arXiv:2507.10593},
year={2025}
}
License
MIT — see LICENSE for details.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file toolregistry-0.9.1.tar.gz.
File metadata
- Download URL: toolregistry-0.9.1.tar.gz
- Upload date:
- Size: 226.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.20
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0f5a77ea069b32b2af277b933fe3085221d5db74b32a4e0711ee6f67412d4ddc
|
|
| MD5 |
d7a8c3c5a60dd2a5e3abd88e3fb62464
|
|
| BLAKE2b-256 |
38e6bfcceba2ea8519b4135dd36e5b1999d8221ef1397e21b2996f045df64f0a
|
File details
Details for the file toolregistry-0.9.1-py3-none-any.whl.
File metadata
- Download URL: toolregistry-0.9.1-py3-none-any.whl
- Upload date:
- Size: 185.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.20
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f53c8ccc1fb4d3f6b402c6022b27506bea26f7c46fdb753752a6aeac7c3f9fe0
|
|
| MD5 |
941ce21ae500a4bcb8b1fdf6f3e05b4d
|
|
| BLAKE2b-256 |
c48f871f1d0a14eae6c31be7c5eaf7a27937ed28121b4f6cdcaeb429d392eba7
|