Contract2Tool: Learning Preconditions and Effects for Reliable Tool-Augmented LLM Agents
On the map: LLM agents and tool use → Tool learning and function calling
Abstract (arXiv)
Tool-augmented large language model agents increasingly rely on external APIs, but standard tool schemas describe how to call a tool, not when the tool is causally appropriate or what task state it produces. Causal tool filtering addresses this gap by using lightweight contracts that specify each tool's preconditions, effects, risk level, and cost. However, manually writing and maintaining such contracts does not scale to large or changing tool ecosystems. We introduce Contract2Tool, a framework for inferring tool contracts from metadata, schemas, documentation, and execution traces. Contract2Tool converts observable tool evidence into normalized symbolic contracts that can be evaluated intrinsically and deployed inside downstream causal tool filtering. We evaluate learned contracts against gold preconditions, effects, and risk labels, and measure their downstream utility on multi-step agent tasks. Our results show that hybrid documentation-and-trace evidence produces contracts accurate enough to preserve most of the reliability and efficiency benefits of gold contracts. Learned-contract CMTF achieves 0.980 downstream success, close to 0.990 for gold-contract CMTF, while reducing visible tools from 100 to 1 and reducing average token usage from 26,172 to 2,528 relative to all-tools exposure. These results suggest that learned contracts can provide a scalable contract layer between tool schemas and reliable agent execution.
Key facts. Cited by 5 papers in the map (data through 14 Oct 2026). Placed in Tool learning and function calling, one of 16 directions in LLM agents and tool use. Builds on 8 of its 11 references that are in the map. First posted on arXiv 5 Jun 2026.
Builds on
8 of 11 references.
Closest ancestors · 7
Same direction, newest first
- 2026ToolChoiceConfusion: Causal Minimal Tool Filtering for Reliable LLM Agents4 Jun
- 2026Self-Healing Agentic Orchestrators for Reliable Tool-Augmented Large Language Model Systems31 May
- 2025ToolScope: Enhancing LLM Agent Tool Use through Tool Merging and Context-Aware Filtering22 Oct
- 2025Retrieval Models Aren't Tool-Savvy: Benchmarking Tool Retrieval for Large Language Models3 Mar
- 2023ToolLLM: Facilitating Large Language Models to Master 16000+ Real-world APIs31 Jul
- 2023API-Bank: A Comprehensive Benchmark for Tool-Augmented LLMs14 Apr
- 2023Toolformer: Language Models Can Teach Themselves to Use Tools9 Feb
Other references · 1
- 2022ReAct: Synergizing Reasoning and Acting in Language Modelscited by 8,695
Built on by
Citing papers per year: 2026: 5.
5 papers.
- 2026Lingering Authority: Revocable Resource-and-Effect Capabilities for Coding Agentscited by 8
- 2026Capability Minimization as a Safety Primitive: Risk-Aware Causal Gating for Least-Privilege LLM Agentscited by 6
- 2026The Gate Is Only as Honest as Its Contracts: ContractGuard for the Contract Layer of Risk-Aware Causal Gatingcited by 2
- 2026Outcome Monitors: Recovery Affordances for Silent Tool Failurescited by 2
- 2026Do Agent Benchmarks Do What They Say? An Executable-Contract Audit of Tool-Using Agent Environmentscited by 2
- 2026Do Agent Benchmarks Do What They Say? An Executable-Contract Audit of Tool-Using Agent Environments29 Sep 2026
- 2026Outcome Monitors: Recovery Affordances for Silent Tool Failures19 Aug 2026
- 2026Lingering Authority: Revocable Resource-and-Effect Capabilities for Coding Agents21 Jun 2026
- 2026The Gate Is Only as Honest as Its Contracts: ContractGuard for the Contract Layer of Risk-Aware Causal Gating17 Jun 2026
- 2026Capability Minimization as a Safety Primitive: Risk-Aware Causal Gating for Least-Privilege LLM Agents11 Jun 2026
Similar, not cited
Close in wording, no citation either way
- 2026Symbolic Temporal Supervision of LLM Agents Using Contracts
- 2026ToolMenuBench: Benchmarking Tool-Menu Filtering Strategies for Reliable and Efficient LLM Agents
- 2026The Evolution of Tool Use in LLM Agents: From Single-Tool Call to Multi-Tool Orchestration
- 2025Tool Preferences in Agentic LLMs are Unreliable
- 2026Action-Space Shaping for LLM Agents: Measuring and Mitigating Tool-Schema Bias
- 2026OpaqueToolsBench: Learning Nuances of Tool Behavior Through Interaction
- 2026DOCSCHISEL: Adaptive Tool Documentation Optimization Framework for LLM Agents
- 2026Cordon: Semantic Transactions for Tool-Using LLM Agents