ToolLibGen: Scalable Automatic Tool Creation and Aggregation for LLM Reasoning

Murong Yue, Zhiwei Liu, Liangwei Yang, Jianguo Zhang, Zuxin Liu +6 more
10/9/2025
cs.CLcs.AI

No confident code implementation found for this paper.

Abstract

Large Language Models (LLMs) equipped with external tools have demonstrated enhanced performance on complex reasoning tasks. The widespread adoption of this tool-augmented reasoning is hindered by the scarcity of domain-specific tools.

Show full abstract

For instance, in domains such as physics question answering, suitable and specialized tools are often missing. Recent work has explored automating tool creation by extracting reusable functions from Chain-of-Thought (CoT) reasoning traces; however, these approaches face a critical scalability bottleneck. As the number of generated tools grows, storing them in an unstructured collection leads to significant retrieval challenges, including an expanding search space and ambiguity between function-related tools. To address this, we propose a systematic approach to automatically refactor an unstructured collection of tools into a structured tool library. Our system first generates discrete, task-specific tools and clusters them into semantically coherent topics. Within each cluster, we introduce a multi-agent framework to consolidate scattered functionalities: a code agent refactors code to extract shared logic and creates versatile, aggregated tools, while a reviewing agent ensures that these aggregated tools maintain the complete functional capabilities of the original set. This process transforms numerous question-specific tools into a smaller set of powerful, aggregated tools without loss of functionality. Experimental results demonstrate that our approach significantly improves tool retrieval accuracy and overall reasoning performance across multiple reasoning tasks. Furthermore, our method shows enhanced scalability compared with baselines as the number of question-specific increases.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. Any repos shown below are weak matches — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{yue2025toollibgen,
  title  = {ToolLibGen: Scalable Automatic Tool Creation and Aggregation for LLM Reasoning},
  author = {Murong Yue and Zhiwei Liu and Liangwei Yang and Jianguo Zhang and Zuxin Liu and Haolin Chen and Ziyu Yao and Silvio Savarese and Caiming Xiong and Shelby Heinecke and Huan Wang},
  year   = {2025},
  eprint = {2510.07768},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2510.07768v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2510.07768.svg)](https://codeofpaper.com/paper/2510.07768)

Discussion