ToolCoder: A Systematic Code-Empowered Tool Learning Framework for Large Language Models
On the map: LLM agents and tool use → Tool learning and function calling
Abstract (arXiv)
Tool learning has emerged as a crucial capability for large language models (LLMs) to solve complex real-world tasks through interaction with external tools. Existing approaches face significant challenges, including reliance on hand-crafted prompts, difficulty in multi-step planning, and lack of precise error diagnosis and reflection mechanisms. We propose ToolCoder, a novel framework that reformulates tool learning as a code generation task. Inspired by software engineering principles, ToolCoder transforms natural language queries into structured Python function scaffold and systematically breaks down tasks with descriptive comments, enabling LLMs to leverage coding paradigms for complex reasoning and planning. It then generates and executes function implementations to obtain final responses. Additionally, ToolCoder stores successfully executed functions in a repository to promote code reuse, while leveraging error traceback mechanisms for systematic debugging, optimizing both execution efficiency and robustness. Experiments demonstrate that ToolCoder achieves superior performance in task completion accuracy and execution reliability compared to existing approaches, establishing the effectiveness of code-centric approaches in tool learning.
Key facts. Cited by 8 papers in the map (data through 7 Oct 2026). Placed in Tool learning and function calling, one of 16 directions in LLM agents and tool use. Builds on 16 of its 27 references that are in the map. First posted on arXiv 17 Feb 2025.
Builds on
16 of 27 references.
Closest ancestors · 8
Same direction, newest first
- 2024What Affects the Stability of Tool Learning? An Empirical Study on the Robustness of Tool Learning Frameworks3 Jul
- 2024Tool Learning with Large Language Models: A Survey28 May
- 2024Tool Learning in the Wild: Empowering Language Models as Automatic Tool Agents26 May
- 2024Learning to Use Tools via Cooperative and Interactive Agents5 Mar
- 2024EASYTOOL: Enhancing LLM-based Agents with Concise Tool Instruction11 Jan
- 2023MINT: Evaluating LLMs in Multi-turn Interaction with Tools and Language Feedback19 Sep
- 2023ToolAlpaca: Generalized Tool Learning for Language Models with 3000 Simulated Cases8 Jun
- 2023API-Bank: A Comprehensive Benchmark for Tool-Augmented LLMs14 Apr
Other references · 8
- 2022ReAct: Synergizing Reasoning and Acting in Language Modelscited by 8,355
- 2022Program of Thoughts Prompting: Disentangling Computation from Reasoning for Numerical Reasoning Taskscited by 1,057
- 2022Binding Language Models in Symbolic Languagescited by 224
- 2023Large Language Models are Versatile Decomposers: Decompose Evidence and Questions for Table-based Reasoningcited by 177
- 2024The Landscape of Emerging AI Agent Architectures for Reasoning, Planning, and Tool Calling: A Surveycited by 164
- 2023CRAFT: Customizing LLMs by Creating and Retrieving from Specialized Toolsetscited by 122
- 2024If LLM Is the Wizard, Then Code Is the Wand: A Survey on How Code Empowers Large Language Models to Serve as Intelligent Agentscited by 77
- 2024From Summary to Action: Enhancing Large Language Models for Complex Tasks with Open World APIscited by 8
Built on by
Citing papers per year: 2025: 6; 2026: 2.
8 papers.
- 2025A Survey of Context Engineering for Large Language Modelscited by 120
- 2025Latent Collaboration in Multi-Agent Systemscited by 67
- 2025LLM Agents for Education: Advances and Applicationscited by 59
- 2025Generative to Agentic AI: Survey, Conceptualization, and Challengescited by 32
- 2025Attractive Metadata Attack: Inducing LLM Agents to Invoke Malicious Toolscited by 23
- 2026Toward Efficient Agents: Memory, Tool learning, and Planningcited by 11
- 2026Tool Retrieval Bridge: Aligning Vague Instructions with Retriever Preferences via Bridge Modelcited by 1
- 2025Benchmarking Web API Integration Code Generationcited by 0
- 2026Tool Retrieval Bridge: Aligning Vague Instructions with Retriever Preferences via Bridge Model9 Apr 2026
- 2026Toward Efficient Agents: Memory, Tool learning, and Planning20 Jan 2026
- 2025Latent Collaboration in Multi-Agent Systems25 Nov 2025
- 2025Benchmarking Web API Integration Code Generation24 Sep 2025
- 2025Attractive Metadata Attack: Inducing LLM Agents to Invoke Malicious Tools4 Aug 2025
- 2025A Survey of Context Engineering for Large Language Models17 Jul 2025
- 2025Generative to Agentic AI: Survey, Conceptualization, and Challenges26 Apr 2025
- 2025LLM Agents for Education: Advances and Applications14 Mar 2025
Similar, not cited
Close in wording, no citation either way
- 2025Understanding Tool-Integrated Reasoning
- 2025ToolHop: A Query-Driven Benchmark for Evaluating Large Language Models in Multi-Hop Tool Use
- 2025Enhancing Tool Learning in Large Language Models with Hierarchical Error Checklists
- 2024Granite Code Models: A Family of Open Foundation Models for Code Intelligence
- 2024ToolEyes: Fine-Grained Evaluation for Tool Learning Capabilities of Large Language Models in Real-world Scenarios
- 2024LLM With Tools: A Survey
- 2026PruneTIR: Inference-Time Tool Call Pruning for Effective yet Efficient Tool-Integrated Reasoning
- 2024Language hooks: a modular framework for augmenting LLM reasoning that decouples tool usage from the model and its prompt