Skip to main content

ToolRegistry

PyPI version GitHub release CI License: MIT arXiv

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 and Stevens, Rick},
  journal={arXiv preprint arXiv:2507.10593},
  year={2025}
}

License

MIT — see LICENSE for 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.15.0.tar.gz (314.8 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.15.0-py3-none-any.whl (251.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: toolregistry-0.15.0.tar.gz
  • Upload date:
  • Size: 314.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for toolregistry-0.15.0.tar.gz
Algorithm Hash digest
SHA256 4978ab346ce27464fba5ba7f87fea0b4784877de23f54452662f2aa3d46c2046
MD5 aa421d7a8c0820de92ea5a2ff3fce5d1
BLAKE2b-256 2bebd9a2d1c6bcebcb7505e61be25702e17acc4620099db95e136a11a223b1df

See more details on using hashes here.

Provenance

The following attestation bundles were made for toolregistry-0.15.0.tar.gz:

Publisher: release.yml on Oaklight/ToolRegistry

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

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

File metadata

  • Download URL: toolregistry-0.15.0-py3-none-any.whl
  • Upload date:
  • Size: 251.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for toolregistry-0.15.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e6fa6183422f4ad9d2afb5f3f3e72f84ea7646e5fd1619a2e0744e10ad7ae468
MD5 47e2a32064ab6bd42a8afe1345f2a095
BLAKE2b-256 1b8d3bdee67ad4b9752f9c822c1f8cfd7b9b339a19fb70f780e6d0aa01997f3a

See more details on using hashes here.

Provenance

The following attestation bundles were made for toolregistry-0.15.0-py3-none-any.whl:

Publisher: release.yml on Oaklight/ToolRegistry

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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