Skip to main content

ToolRegistry: A Protocol-Agnostic Tool Management Library for Function-Calling LLMs (OpenAI, Anthropic, Gemini, LangChain, MCP)

Project description

ToolRegistry

PyPI version GitHub release CI License: MIT Ask DeepWiki

English Version | 中文版

A protocol-agnostic tool management library for function-calling LLMs.

Documentation · arXiv Paper

Ecosystem

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)

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 pydantic and llm-rosetta as 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

toolregistry-0.10.3.tar.gz (239.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

toolregistry-0.10.3-py3-none-any.whl (187.1 kB view details)

Uploaded Python 3

File details

Details for the file toolregistry-0.10.3.tar.gz.

File metadata

  • Download URL: toolregistry-0.10.3.tar.gz
  • Upload date:
  • Size: 239.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.20

File hashes

Hashes for toolregistry-0.10.3.tar.gz
Algorithm Hash digest
SHA256 e0e56405ae20cccf504feb83253a58cc6811763a77aa58bc599b534208d4a78e
MD5 7a8bd77e86cc7fc14d0710b739602266
BLAKE2b-256 b3eb4051f952c032f0eb9e4114e63396465c7721a79268f237f144079dba4180

See more details on using hashes here.

File details

Details for the file toolregistry-0.10.3-py3-none-any.whl.

File metadata

  • Download URL: toolregistry-0.10.3-py3-none-any.whl
  • Upload date:
  • Size: 187.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.20

File hashes

Hashes for toolregistry-0.10.3-py3-none-any.whl
Algorithm Hash digest
SHA256 c15090d4c6955c53c39aae8e01caf3fcde5d8fdf6be75384864852e371420908
MD5 06cde61fc6ac77d86665cd540f455b2b
BLAKE2b-256 fa9380e9bf12ace76d3c5a4f5b900a3692aa9da9d8246c9ddb91a8f1c899b11a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page