English

ToolRegistry: A Protocol-Agnostic Tool Management Library for Function-Calling LLMs

Software Engineering 2026-05-26 v3 Artificial Intelligence Computation and Language Machine Learning

Abstract

Every LLM tool call is structurally an RPC -- a function name, JSON arguments, and a serialized result -- yet each protocol (native Python, MCP, OpenAPI, LangChain) is integrated from scratch. We present ToolRegistry, a system that makes this RPC nature explicit: a single Tool object acts as a universal stub regardless of transport, while the registry serves as the RPC client runtime for dispatch, schema generation, and execution. The system ships as three packages -- a core registry, a server exposing tools over MCP and OpenAPI, and a hub of production-ready implementations -- and invokes tools through pluggable thread or process backends. The system now also provides tag-based permission policies, BM25F-powered progressive tool disclosure for large registries, think-augmented function calling, multi-provider schema support (OpenAI, Anthropic, Gemini), declarative JSONC/YAML configuration, and a near-zero-dependency core built on stdlib-only vendored modules. In our benchmarks the library cuts integration code by 60-80%, and choosing the right concurrency mode (thread vs. process) yields up to 3.1x throughput over the alternative for a given workload. ToolRegistry is open-source at https://github.com/Oaklight/ToolRegistry; documentation lives at https://toolregistry.readthedocs.io/.

Cite

@article{arxiv.2507.10593,
  title  = {ToolRegistry: A Protocol-Agnostic Tool Management Library for Function-Calling LLMs},
  author = {Peng Ding and Rick Stevens},
  journal= {arXiv preprint arXiv:2507.10593},
  year   = {2026}
}

Comments

16 pages, 4 figures, v3: add co-author, permission system, progressive tool disclosure, think-augmented calling, RPC framing, multi-provider support

R2 v1 2026-07-01T04:00:47.321Z