跳转至

面向 LLM 应用的协议无关工具层

异构工具的统一管理层。

统一注册、描述、发现、执行并返回来自原生 Python、MCP、OpenAPI 以及未来更多来源的工具,并为 OpenAI、Anthropic 和 Gemini 兼容 API 适配工具 schema 与调用格式。

PyPI version CI License: MIT arXiv

快速上手 函数调用 了解生态系统

选择你的路径

用 Python 构建

注册普通 Python callable,并使用验证、日志、权限和并发控制来执行工具。

从这里开始 →

连接 LLM Provider

为 OpenAI、Anthropic、Gemini 和 OpenAI-compatible API 生成 schema 并恢复工具调用。

函数调用 →

接入外部工具

从 MCP server、OpenAPI spec、原生 Python class 以及未来更多 source adapter 导入工具。

集成指南 →

服务化注册表

toolregistry-server 将同一份 registry 暴露为 OpenAPI 或 MCP,或直接使用 toolregistry-hub 的现成工具。

架构概览 →

安装

pip install toolregistry

需要 MCP/OpenAPI 集成?

pip install "toolregistry[mcp,openapi]"

生态系统

包名 适用场景
toolregistry 核心注册、schema 生成、执行、权限和元数据管理
toolregistry-server 将 registry 服务化为 OpenAPI 或 MCP 服务
toolregistry-hub 搜索、网页抓取、日期时间、单位转换等现成工具

引用

@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}
}