Reproduce “ToolGate: Contract-Grounded and Verified Tool Execution for LLMs” on OpenResearch

Run Claude Code, Codex or any coding agent as a research agent: literature, hypotheses and experiments on your laptop, cluster or cloud GPUs.

Universal app for Apple silicon and Intel. Requires macOS 11 or later.

About this paper

Yanming Liu, Xinyue Peng, Jiannan Cao, Xinyi Wang, Songhang Deng, Jintao Chen, Jianwei Yin, Xuhong Zhang

ToolGate structures LLM tool use around a typed trusted state and contracts: preconditions gate calls, while postconditions validate returned data before it is committed. In GPT-5.2’s MCP-Universe Repository Management task, it reports a 45.45% Success Rate versus 39.39% for ToolChain*. Its guarantee is conditional on sound contracts and an initially valid state.

Key insights

  • Formal verification, particularly postcondition checks, is crucial for preventing the propagation of subtle, logically flawed tool outputs and significantly enhances the reliability of the system.
  • Hoare logic effectively prunes the LLM's search space by eliminating logically impossible execution paths, leading to more concise and efficient tool-calling trajectories.
  • The explicit symbolic state and verifiable logical checks enable a hybrid approach that combines the flexible reasoning of LLMs with the stringent guarantees of formal logic, fostering greater trustworthiness.

Summary by alphaXiv.

Tip: change arxiv.org to autoarxiv.org in any arXiv abstract link to open the paper here.