Hugging Face Papers ↗ · 2026-11-23
ToolSmith: An Automatic Tool-Generation Framework for Multimodal Search Agents
Media reports Hugging Face Papers Source language: Chinese
ToolSmith automatically creates and verifies new tools for multimodal search agents, consistently improving performance across benchmarks.
Full text
\tl_set:Ne\toolhl
toolhl
ToolSmith
An Automatic Tool-Generation Framework for Multimodal Search Agents
Rui Sun Affiliation: University of California, Los Angeles Email: ruis@g.ucla.edu Junhua Huang Affiliation: University of California, Los Angeles Luca Zancato Affiliation: AWS GenAI Md Mofijul Islam Kai-Wei Chang
Abstract
Recent multimodal search agents use reasoning, vision, and live web search across many turns to answer questions beyond parametric knowledge by orchestrating a small library of hand-crafted search and visual tools. However, the library is laborious to create and maintain, and frozen when new query types, evidence formats, and failure modes are encountered in the wild. Human practitioners, by contrast, cope with insufficient tools by fashioning new ones from familiar parts and reusing them across tasks. Inspired by this, we propose ToolSmith, an automatic tool-generation framework that grows and reuses modules on top of a lean base tool library. We evaluate ToolSmith on three in-domain multimodal search benchmarks and ten out-of-domain benchmarks under a VLM-as-a-Judge protocol. ToolSmith consistently improves over the base library across deployed agents of varying scales, with larger backbones reaping greater gains, demonstrating the scalability of the approach. Our code and data is available at https://threesr.github.io/toolsmith/.
†† †\dagger Equal advising.

Figure 1: We propose an automatic tool-generation framework for multimodal search agents. In the example shown, an agent restricted to a fixed tool library is bound to its pre-defined primitives and fails on queries that no original tool can directly resolve. Our framework instead grows the library: the agent operates over an extended tool library that includes newly generated tools and can invoke them freely when solving real queries. Here, the newly generated \toolhlEvent In Image tool resolves the query through finer-grained information verification and image search.
1 Introduction
Multimodal search agents (Geng et al., 2026; Huang et al., 2026; Yao et al., 2026; Chen et al., 2026a; Wu et al., 2025; Narayan et al., 2025) answer information-seeking questions beyond static knowledge inside the model, such as identifying the source of the rare knowledge, cross-checking a numerical claim against the live web, or assembling a multi-step provenance argument across images and retrieved pages. Contemporary systems handle such tasks by orchestrating reasoning, perception, and live web search across many turns over a fixed inventory of hand-crafted tools. It typically contains web search, webpage fetching, image grounding, OCR, depth estimation, and code execution. Throughout this paper, we use tool to mean a callable Python utility, exposed to the agent through a typed schema, that takes structured input (a text query, an image, a URL) and returns evidence the agent’s reasoning loop consumes in a subsequent turn; generating a new tool means producing a new such callable schema, execution logic, and all, and admitting it to the catalog the agent draws from at inference.
Nevertheless, hand-crafted tools suffer from inherent limitations. First, tool inventories shipped with production systems and developer-curated skill banks (VoltAgent and Contributors, 2026) are expensive to maintain and frozen at the developer’s anticipated coverage. When new query types, evidence formats, and failure modes are encountered in the wild, human intervention will be needed to modify the tools. Second, complementary lines of work that learn memory over a fixed inventory (Xiao et al., 2025) or train an agent to use existing tools more efficiently (Gao et al., 2025; Wu et al., 2026) sharpen how the agent uses its tools but do not expand which tools it has.
A natural alternative is letting the agent itself generate the missing tool. Tool generation has been studied across adjacent domains such as vision–language understanding, math and table QA, general NLP, and embodied / computer-use agents (Chen et al., 2024; Yuan et al., 2024; Wölflein et al., 2025; Wang et al., 2023; Wang et al., 2025), but has not been carried over to multimodal search, where the inventory remains hand-authored. The transfer is non-trivial: search-agent trajectories are long, and agent state mixes images, link references, and tool outputs across turns.
When exploring the world, human practitioners both use existing tools and fashion new ones when existing tools fall short (Goodall, 1964; Beck, 1980; Tomasello, 1999). We argue that a multimodal search agent should be equipped with the same capability. When existing tools fall short, the agent should organically fashion new ones from familiar parts, refining and reusing them across tasks. Currently, multimodal search agents only share the using half of this picture but conspicuously not the fashioning half. When their tool set fails, they ’let it go’ rather than enlarge and revise the toolbox. Moreover, humans do not blindly adopt every novel implementation they sketch. They verify it on test cases before adding it to the working library (Schön, 1983). An agent equipped to grow its tools must also be equipped to verify them.
To this end, we introduce ToolSmith, an automatic tool-generation framework organized as four model-agnostic phases: 1) Trajectory Mining, 2) Reuse-or-Grow Decision, 3) Tool Generation, 4) Two-Gate Verification. We cluster the agent’s failed trajectories into capability gaps (Shinn et al., 2023; Andrychowicz et al., 2017; Chen et al., 2025), check each gap against a lean library of eight primitives to decide reuse versus generation, prompt a generator VLM to author new tools as Python source under structural and anti-hardcode constraints, and admit candidates only after sandboxed sanity and LLM static code-review gates.
We evaluate ToolSmith across 3 in-domain multimodal search benchmarks (FVQA, InfoSeek, EncyclopedicVQA) and 10 out-of-domain benchmarks under a VLM-as-a-Judge manner. When using the Qwen3-VL-8B-Instruct model, admitted tools improve the base tool library by +2.20pp in-domain and +1.33pp out-of-domain tasks. Gains scale with backbone capacity, reaching +2.98pp out-of-domain on Qwen3-VL-32B-Instruct and a consistent uplift on GPT-5. We also utilize a comprehensive ablation study to demonstrate how different tool generation models and training samples affect the benchmark performance. Our code and data will be publicly available.
Contributions.
1.
We propose ToolSmith, to the best of our knowledge, the first automatic tool-generation framework for multimodal search agents, with a model-agnostic four-phase pipeline over a base tool library of search, visual, and code-execution tools.
2.
On 3 in-domain and 10 out-of-domain multimodal search benchmarks, admitted tools improve the base library across different models, with gains extending to larger backbones, which demonstrate the scalability and flexibility of our proposed ToolSmith.
3.
We conduct ablation studies to analyze overhead, new-tool usage, tool-call distribution, tool-filtering, and failure modes, which provides an objective landscape of ToolSmith.
2 Related Work
Multimodal search agents.
Our work targets multimodal search, where a query is resolved by orchestrating reasoning, perception, and live web retrieval across many turns. A growing collection of benchmarks frames this task: MMSearch (Jiang et al., 2025) couples a multimodal query with a curated search engine; MMSearch-Plus (Tao et al., 2026) adds provenance-aware verification; BrowseComp-VL (Geng et al., 2026) and MM-BrowseComp (Li et al., 2025) raise cross-modal information-seeking difficulty; VisBrowse-Bench (Zhang et al., 2026b) targets visual-native search; and RealX-Bench (Hong et al., 2026a) couples fine-grained perception with multi-hop retrieval. Beyond pure search, the landscape extends to embodied tasks that integrate web information with physical action (Hong et al., 2026b). These tasks build on vision-language understanding, where models must ground fine-grained visual evidence (You et al., 2022; Sun et al., 2023; Wang et al., 2024) and abstain when the visual context is insufficient (Liu et al., 2024). Recent browsing agents tackle these benchmarks via hand-engineered tool inventories (Geng et al., 2026; Huang et al., 2026; Yao et al., 2026; Chen et al., 2026a; Wu et al., 2025; Narayan et al., 2025; Zhou et al., 2026), supervised fine-tuning or reinforcement learning that teaches tool use and action selection (Jiang et al., 2026a), or memory learned over a fixed inventory (Xiao et al., 2025; Hasegawa et al., 2025; Jiang et al., 2026b). Our contribution is orthogonal: rather than freeze the inventory, we generate it.
Tool generation.
Building on a lineage of LLM-orchestrated modular vision-language reasoning (You et al., 2023), our work is closely related to a recent line of methods in which the agent itself constructs new tools. GENOME (Chen et al., 2024) grows a library of vision-module wrappers proposed by an LLM and validated on few-shot examples. CRAFT (Yuan et al., 2024) creates and retrieves Python tools for math, table QA, and image classification. TOOLMAKER (Wölflein et al., 2025) turns code repositories into LLM-callable utilities for general NLP. Voyager (Wang et al., 2023) grows an executable skill library for an open-ended Minecraft agent, with a parallel line of work (Wang et al., 2025) carrying the idea to web agents via online programmatic skill induction. EvolveR (Wu et al., ) distills past trajectories into textual principles that guide future behaviour, and WorldMind (Ren et al., 2026) builds a symbolic world-knowledge repository from agent experience for physically-grounded action. Compared with these, we introduce the tool generation framework into the multimodal search domain.
3 Method

Figure 2: Overview of the ToolSmith pipeline: capability gaps mined from agent trajectories on a training pool are filtered through reuse-or-grow against the tool catalog, passed to an LLM that authors each new tool as Python source, and admitted only after verification gates with a feedback-driven retry on rejection.
ToolSmith is organized as a four-phase pipeline (Figure 2): Phase 1 mines capability gaps (query patterns the base tools cannot handle) from the baseline agent’s failed trajectories. Phase 2 decides, per gap, whether to reuse an existing tool or escalate to generation. Phase 3 prompts a generator LLM to author the new tool as Python code. Phase 4 admits the candidate after verification gates. At inference time, a lightweight retrieval step selects relevant generated tools per query.
Notation.
Let 𝒜θ\mathcal{A}_{\theta} be the baseline agent, 𝒟train\mathcal{D}_{\text{train}} the training pool, and 𝒯t\mathcal{T}_{t} the tool catalog at round tt, initialized with the eight base tools, 𝒯0=𝒯base\mathcal{T}_{0}=\mathcal{T}_{\text{base}}. A trajectory τ\tau records the agent’s full tool-call sequence on a single query. We write GϕG_{\phi} for the generator LLM, ψ\psi for a sentence encoder, and cos(⋅,⋅)\cos(\cdot,\cdot) for cosine similarity.
3.1 Phase 1: Trajectory Mining
We roll out 𝒜θ\mathcal{A}_{\theta} on 𝒟train\mathcal{D}_{\text{train}} and apply a two-layer trigger to each trajectory. Layer A (cheap signal) flags any trajectory whose final answer the LLM judge marks as incorrect. Layer B (LLM self-critique) then reads each flagged trajectory and assigns a failure label from {new_tool_needed, argument_mistake, search_noise, ambiguous}. Only new_tool_needed trajectories yield a capability gap, which we record as the tuple of (failing query, tools the agent already tried, the self-critique’s failure reason, and an image reference when image-grounded).
Clustering.
To ensure diversity in candidates, we embed each capability gap as the concatenation of its question, prediction, and gold answer using a sentence encoder ψ\psi, then apply agglomerative clustering (average linkage) over cosine distance into CC clusters. One representative per cluster enters Phases 2–4.
3.2 Phase 2: Reuse-or-Grow Decision
Phase 2 decides, for each capability gap, whether the current tool catalog already covers it or a new tool is needed. We compute the TF–IDF cosine similarity between the gap’s text (its query and subtask) and every existing tool’s description, and take the maximum:
ρpre(g,𝒯t)=maxt∈𝒯tcos(tfidf(g~),tfidf(dt)),\rho_{\text{pre}}(g,\mathcal{T}_{t})=\max_{t\in\mathcal{T}_{t}}\cos\!\bigl(\mathrm{tfidf}(\widetilde{g}),\,\mathrm{tfidf}(d_{t})\bigr), (1)
where dtd_{t} is the description of tool tt and g~=qg⊕sg\widetilde{g}=q_{g}\oplus s_{g} concatenates the gap’s query and subtask. If ρpre>τpre\rho_{\text{pre}}>\tau_{\mathrm{pre}}, the gap is treated as covered by the best-matching tool and skipped; otherwise it is forwarded to Phase 3. TF–IDF suffices here because tool descriptions are short, the vocabulary is domain-specific (search, image, OCR, code), and we only need to detect obvious overlaps.
3.3 Phase 3: Tool Generation
Phase 3 takes each gap that Phase 2 forwards and writes a new tool for it. We prompt a generator LLM GϕG_{\phi} to produce Python source code conditioned on the gap, the current catalog, a system prompt that specifies the tool-class interface and forbids dynamic execution / unsanctioned I/O / hard-coded answers, and a handful of example tools the generator can imitate (full prompts and examples in Appendix F). The output is a candidate cc comprising Python source, a typed schema, and a short natural-language description, which is then forwarded to Phase 4 for verification. Representative code listings of admitted, failed, and filtered candidates appear in Appendix G.
3.4 Phase 4: Verification and Inference
A candidate is admitted only if it passes both verification gates followed by a redundancy check against the existing catalog. We run the gates in order of increasing computational cost: Gate 1 is a cheap static check, so candidates that fail it are dropped before we pay for Gate 2’s LLM critic.
Gate 1: Sandboxed sanity.
The candidate’s source is parsed and scanned for dynamic-execution and dangerous-I/O patterns, then executed once on a minimal dummy input under a ten-second wall-clock budget. Anything that violates the static checks or errors at runtime is rejected.
Gate 2: LLM static code review.
An LLM critic scores the candidate on four 0–5 axes (parametric usage, description abstractness, edge-case handling, and task alignment) and admits it only when the mean score is at least μmin\mu_{\min} and the minimum across axes is at least amina_{\min}. The critic may use a different model from the generator; tools with overly narrow descriptions or missing error handling are caught here.
Feedback-driven retry.
When either gate rejects a candidate, we re-prompt GϕG_{\phi} with a short natural-language summary of which gate failed and why, up to a per-candidate budget AA. Empirically, most retries either pass on the second attempt or remain wrong for the same reason, so AA is capped at a small constant.
Tool catalog update.
A candidate that survives both gates is then compared against every existing tool by TF–IDF cosine similarity over descriptions (the same construction as Eq. 1, with a stricter threshold τpost\tau_{\mathrm{post}}). Only candidates whose closest match falls below τpost\tau_{\mathrm{post}} are admitted to the next-round catalog 𝒯t+1\mathcal{T}_{t+1}; redundant duplicates are dropped.
Inference.
Exposing the full generated catalog alongside the base primitives would inflate the per-turn schema and degrade tool selection. We instead retrieve a per-query subset: each tool description dtd_{t} is pre-embedded with ψ\psi; given a test query qq, the agent sees
𝒯q=𝒯base∪top-K(cos(ψ(q),ψ(dt)),t∈𝒯new)\mathcal{T}_{q}=\mathcal{T}_{\text{base}}\;\cup\;\operatorname{top\text{-}K}\!\bigl(\cos(\psi(q),\,\psi(d_{t}))\;;\;t\in\mathcal{T}_{\text{new}}\bigr) (2)
yielding |𝒯base|+K|\mathcal{T}_{\text{base}}|+K tools per sample. The base primitives are always visible (they are referenced by name in the agent’s system prompt); the generated tools rotate per query based on relevance. Hyperparameter values are listed in Appendix E.
4 Experimental Setup
4.1 Base Tool Library
Our base library consists of eight primitive tools grouped into three capability categories: Search, Vision, and Code Execution. The search tools are powered by the Serper API11 1 https://serper.dev/; the visual tools wrap SAM3 (Carion et al., 2026), PaddleOCR-VL (Cui et al., 2025), and Depth Anything 3 (Lin et al., 2025) as their underlying models. Table 1 lists the eight tools with a one-line description each. More details can be found at Appendix C.
Tool Description
Search
Text Search Web search with automatic query-intent routing.
Image Search Reverse image search (image →\rightarrow entities and URLs).
Webpage Visit Fetch URL(s) and extract goal-relevant content.
Vision
Zoom-in Crop a region by normalized bounding box.
Visual Grounding Locate regions matching a text query.
OCR Extract printed text from an image.
Depth Estimation Estimate a per-pixel depth map for an image.
Code execution
Code Execution Execute a Python snippet (agent-authored or LLM-authored from a goal in plain language) over prior tool outputs.
Table 1: Base library of eight primitive tools, grouped by capability. Detailed schemas and tool documentation appear in Appendix C.
These eight span the major primitive categories a multimodal search agent commonly relies on, providing a broad foundation on top of which our pipeline grows additional, task-specific tools.
4.2 Tool-Generation Training Pool
We collect trajectories from the train or val splits of three knowledge-intensive multimodal search datasets: FVQA (Wu et al., 2025), InfoSeek (Chen et al., 2023), and EncyclopedicVQA (Mensink et al., 2023). The held-out test splits of the same three datasets serve as our in-domain (ID) evaluation in Section 4.3, providing a within-distribution measure of whether the generated tools address the failure modes they were designed for. No example from any out-of-domain benchmark enters tool generation. We defer per-dataset sampling sizes and split choices to Appendix F.1.
4.3 Evaluation Benchmarks
We evaluate ToolSmith along two axes: in-domain (ID) performance on the held-out test splits of the three datasets we used to mine capability gaps during training, and out-of-domain (OOD) transfer to ten public multimodal search benchmarks unseen during tool generation. Per-benchmark sample counts are summarized in Table 8, and full per-benchmark descriptions are deferred to Appendix B.1.
In-domain (ID).
ID evaluation uses the held-out test splits of FVQA (Wu et al., 2025), InfoSeek (Chen et al., 2023), and EncyclopedicVQA (Mensink et al., 2023). Because the training pool from which we mine capability gaps comes from the training splits of these same datasets, the test splits provide a within-distribution measure of how well the generated tools address the failure modes they were designed for. We give full per-benchmark descriptions in Appendix B.1.1.
Out-of-domain (OOD).
OOD evaluation uses ten public multimodal information-seeking benchmarks: MM-BrowseComp (Li et al., 2025), SimpleVQA (Cheng et al., 2025), MMSearch (Jiang et al., 2025), MMSearch-Plus (Tao et al., 2026), HLE-VL (Phan et al., 2025), LiveVQA (Fu et al., 2026), BrowseComp-VL (Geng et al., 2026), RealX-Bench (Hong et al., 2026a), VDR-Bench (Huang et al., 2026), and VisBrowse-Bench (Zhang et al., 2026b). None of these share data with the training pool. For benchmarks that mix text-only and image-grounded items we restrict evaluation to the multimodal subset (queries carrying at least one image), so the reported counts are smaller than the full-benchmark totals. Appendix B.1.2 provides per-benchmark descriptions.
Final-answer correctness is judged by a VLM-as-a-Judge prompted with GPT-4o (Hurst et al., 2024), following (Huang et al., 2026; Chen et al., 2026a); the prompt and a discussion of retrieval-shortcut concerns are in Appendix B.2.
4.4 Models and Implementation
Models.
We consider three open-sourced models, including Qwen3-VL-8B-Instruct (Bai et al., 2025), Qwen3-VL-8B-Thinking, and Qwen3-VL-32B-Instruct, since all of them can cover different model sizes (8B vs 32B) and model variants (Instruct vs Thinking). For proprietory models, we consider GPT-5 (gpt-5-2025-08-07). We sample at temperature 0.30.3 with top-pp 0.950.95, allow up to fifteen tool-calling iterations per query, and cap context at 120K tokens; full hyperparameters are in Appendix E.
Evaluation protocol.
Because the search APIs, the agent’s tool-routing decisions, and the LLM judge are all stochastic, every reported number is the mean of three independent runs.
5 Main Results
Tables 2 and 3 report headline accuracy on the in-domain (ID) and out-of-domain (OOD) benchmarks under three settings per inference backbone: Direct Inference (no tools), Agent Workflow w/ Base Tools (the eight-primitive base library), and Agent Workflow w/ Base and ToolSmith (GPT-5) (the base library plus tools admitted by ToolSmith when GPT-5 is fixed as the generator).22 2 Inference rows for GPT-5 here are systematically lower-bounded by privacy-driven refusals on identity-related queries; see Appendix B.4.
The eight base primitives alone lift Qwen3-VL-8B-Instruct by roughly +25+25pp on ID and +10+10pp on OOD over Direct Inference, with 32B and GPT-5 showing comparably large jumps; multimodal search is clearly a tool-driven task. Adding the ToolSmith-generated tools on top of the base library yields further consistent gains of one to three points on both ID and OOD across all three inference backbones, and the gains are pervasive per-benchmark: 32B and GPT-5 improve on every OOD benchmark and 8B improves on eight of the ten, with the remaining two essentially flat.
The average gain peaks at 32B (+2.32+2.32pp across ID and OOD), with GPT-5 (+1.72+1.72pp) and 8B (+1.77+1.77pp) close behind for different reasons: GPT-5’s smaller gain partly reflects its privacy-refusal floor (Appendix B.4); 8B’s reflects the long-context tool-selection cost of an enlarged toolbox. The Qwen3-VL-8B-Thinking variant modestly outperforms Instruct under Direct Inference but takes more than 5×5\times the per-query latency inside the full agent workflow, so we standardize on Instruct as the default deployed agent for all subsequent results, ablations, and analyses.
Model FVQA InfoSeek Enc-VQA Avg
Direct Inference
Qwen3-VL-8B 28.39 29.20 10.61 22.62
Qwen3-VL-8B-T 25.67 27.25 18.06 23.63
Qwen3-VL-32B 32.67 33.20 32.76 32.88
GPT-5 54.67 53.67 43.33 50.46
Agent Workflow w/ Base Tools
Qwen3-VL-8B 55.00 50.67 38.67 47.94
Qwen3-VL-32B 62.67 55.33 49.00 55.47
GPT-5 55.00 52.00 48.67 51.80
Agent Workflow w/ Base Tools and ToolSmith (GPT-5)
Qwen3-VL-8B 58.00 53.00 40.00 50.14
Δ\Delta ++3.00 ++2.33 ++1.33 ++2.20
Qwen3-VL-32B 64.55 56.99 50.47 57.14
Δ\Delta ++1.88 ++1.66 ++1.47 ++1.67
GPT-5 56.10 53.04 49.64 52.84
Δ\Delta ++1.10 ++1.04 ++0.97 ++1.04
Table 2: In-domain benchmark results. It contains per-benchmark accuracy on the held-out test splits of the three training datasets. New tools are generated by GPT-5 and utilized by the listed inference model. Qwen3-VL-8B refers to Qwen3-VL-8B-Instruct and Qwen3-VL-8B-T denotes the Qwen3-VL-8B-Thinking. Enc-VQA = EncyclopedicVQA. Avg is the mean across the three benchmarks (1800 / 2000 / 1960).
Model MM-BC SVQA MMS MSP HLE-VL LVQA BC-VL RXB VDR VBB Avg
Direct Inference
Qwen3-VL-8B 4.94 54.33 14.04 1.29 6.36 34.67 21.05 22.16 5.40 7.69 16.97
Qwen3-VL-8B-T 7.41 54.67 12.87 3.22 10.30 29.33 33.83 22.16 8.20 11.24 19.68
Qwen3-VL-32B 6.58 59.00 20.47 2.57 10.00 32.67 28.82 24.74 9.40 10.06 20.36
GPT-5 8.64 66.33 36.84 14.79 23.33 42.33 42.11 34.54 14.20 28.40 30.41
Agent Workflow w/ Base Tools
Qwen3-VL-8B 6.00 70.00 51.46 9.97 7.27 40.00 32.33 34.71 14.40 11.24 26.57
Qwen3-VL-32B 10.29 70.33 62.57 12.86 11.52 51.33 33.08 40.21 18.80 19.53 31.27
GPT-5 25.93 68.33 56.14 25.40 23.03 50.67 52.38 40.72 23.80 49.11 39.80
Agent Workflow w/ Base Tools and ToolSmith (GPT-5)
Qwen3-VL-8B 7.00 71.00 55.56 11.58 7.27 42.67 33.08 34.54 16.60 11.22 27.90
Δ\Delta ++1.00 ++1.00 ++4.10 ++1.61 0.00 ++2.67 ++0.75 −-0.17 ++2.20 −-0.02 ++1.33
Qwen3-VL-32B 13.58 73.33 64.33 16.08 13.03 56.00 36.09 43.30 22.00 21.89 34.25
Δ\Delta ++3.29 ++3.00 ++1.76 ++3.22 ++1.51 ++4.67 ++3.01 ++3.09 ++3.20 ++2.36 ++2.98
GPT-5 29.22 71.00 57.31 27.65 24.55 56.67 53.88 42.27 25.80 50.89 42.20
Δ\Delta ++3.29 ++2.67 ++1.17 ++2.25 ++1.52 ++6.00 ++1.50 ++1.55 ++2.00 ++1.78 ++2.40
Table 3: Out-of-domain benchmark results. It has per-benchmark accuracy on the ten multimodal search benchmarks unseen during tool generation. Tools are generated by GPT-5 and used by the listed inference model. Qwen3-VL-8B refers to Qwen3-VL-8B-Instruct and Qwen3-VL-8B-T denotes the Qwen3-VL-8B-Thinking. Abbreviations: MM-BC = MM-BrowseComp; SVQA = SimpleVQA; MMS = MMSearch; MSP = MMSearch-Plus; LVQA = LiveVQA; BC-VL = BrowseComp-VL; RXB = RealX-Bench; VDR = VDR-Bench; VBB = VisBrowse-Bench. Avg is the average performance across the ten benchmarks (total 2917 instances; per-benchmark counts in Table 8).
6 Ablation Studies
The inference-backbone axis is already covered by the main results (Section 5), which sweep Qwen3-VL-8B-Instruct, 32B-Instruct, 8B-Thinking, and GPT-5 with a fixed GPT-5 tool generator. This section ablates the remaining design choices: which model authors new tools, whose trajectories the pipeline mines, and how the cluster-count knob shapes the resulting tool bank. Because each ablation requires re-running Phases 1–4 of the pipeline end-to-end on the full training pool, we restrict every sweep below to one representative ID benchmark (FVQA) and one representative OOD benchmark (MMSearch) to keep the compute budget tractable.
6.1 Tool-Generation Model
The main results (Section 5) sweep the inference backbone with a fixed GPT-5 generator; here we instead vary the tool-generation model over (GPT-5, Qwen3-VL-32B-Instruct, Qwen3-VL-8B-Instruct), and for each generator evaluate the resulting tool bank on the same three inference backbones. We restrict the sweep to one representative ID benchmark (FVQA) and one representative OOD benchmark (MMSearch) to keep the cost contained, and treat the resulting numbers as an illustrative finding rather than a statistical claim. Generation-process statistics (pass rates, dedup, cost) for the three generators are reported in Appendix F.2.
Inference model
Benchmark Generator 8B 32B GPT-5
FVQA Base tools only 55.00 62.67 55.00
Qwen3-VL-8B 52.00 60.67 54.00
Qwen3-VL-32B 56.00 63.17 55.20
GPT-5 58.00 64.55 56.10
MMSearch Base tools only 51.46 62.57 56.14
Qwen3-VL-8B 48.54 60.82 54.97
Qwen3-VL-32B 53.22 63.16 56.73
GPT-5 55.56 64.33 57.31
Table 4: Tool-generation model ablation. Rows: the model that authors the new tool in Phase 3 (the tool-generation model). The Base tools only row is the no-ToolSmith reference (i.e., the agent runs with the eight base primitives alone; values reproduce the +Base rows of Tables 2 and 3 for the FVQA and MMSearch columns). Columns: the inference model that consumes the tools.
Reading the matrix by column (fix the consumer, vary the generator), accuracy rises monotonically with generator strength on both benchmarks, for every consumer, with no exceptions. A stronger generator simply produces better tools; the gain is largest when the consumer is weakest (the 8B-Instruct consumer picks up roughly six to seven points going from an 8B to a GPT-5 generator, versus only about two points for the GPT-5 consumer). Conversely, pairing the GPT-5 consumer with an 8B generator loses about two points relative to the all-GPT-5 cell. The take-away is that the choice of generator dominates the design: invest compute in the strongest available generator, and let the deployed agent scale separately.
6.2 Trajectory-Mining Source Model
We additionally vary the model whose trajectories are mined in Phase 1, holding the tool generator at GPT-5 and the consumer at Qwen3-VL-8B-Instruct. A weak miner surfaces many simple, frequent gaps; a strong miner produces fewer but more specialized failures. The question is whether the 8B consumer prefers tools mined from its own failures or from a stronger model’s.
Trajectory source |𝒯new||\mathcal{T}_{\text{new}}| FVQA MMSearch
Qwen3-VL-8B 264 58.00 55.56
Qwen3-VL-32B 218 57.11 54.97
GPT-5 173 56.50 54.39
Table 5: Trajectory-mining source ablation. The tool generator is fixed at GPT-5, and the inference model is Qwen3-VL-8B-Instruct. |𝒯new||\mathcal{T}_{\text{new}}| is the number of tools admitted after both verification gates.
The admitted tool count |𝒯new||\mathcal{T}_{\text{new}}| decreases monotonically with miner strength (stronger miners fail less, surfacing fewer raw gaps), and the 8B miner is best on both benchmarks; stronger miners cost roughly a point on FVQA and half that on MMSearch. The take-away is that miner strength should be matched to consumer strength: for an 8B deployed agent, self-mining gives the best alignment between the failure patterns the generator sees and the patterns the consumer hits at inference.
6.3 Cluster Count
We vary the Phase 1 cluster count CC, which controls how many capability-gap representatives are forwarded to Phases 2–4 and is therefore the effective “training-sample” count for tool generation (the raw rollout pool of 9,174 queries is fixed, see Section 3.1). All other components are held fixed. The sweep is intentionally coarse: we want to confirm the shape of the curve, not aggressively tune CC.
CC |𝒯new||\mathcal{T}_{\text{new}}| FVQA MMSearch
0 0 55.00 51.46
250 145 57.39 54.97
500 264 58.00 55.56
750 298 57.50 54.97
Table 6: Phase 1 cluster-count sweep. CC is the number of clustered gap representatives passed to Phases 2–4, |𝒯new||\mathcal{T}_{\text{new}}| the number of tools admitted to the tool catalog after both verification gates, and the last two columns are accuracy on a representative ID benchmark (FVQA) and a representative OOD benchmark (MMSearch), under Qwen3-VL-8B-Instruct with GPT-5 as tool generator. The C=0C{=}0 row is the eight-primitive baseline. C=500C{=}500 is the main-results default.
The expected Goldilocks pattern emerges: too few clusters yield a small, broad tool bank that lifts accuracy only modestly, while too many spread the within-cluster support too thin and the admitted-tool count plateaus. The mid-range C=500C{=}500 sits slightly above both C=250C{=}250 and C=750C{=}750 on the two benchmarks, indicating a flat plateau rather than a sharp optimum; we adopt 500 as the default and do not tune further.
7 Analysis
7.1 Overhead
Both the one-time tool-generation cost and the per-query inference overhead of ToolSmith are manageable in practice. Due to space, we defer the full token, dollar, wall-clock, and per-query breakdown to Appendix H.
7.2 New-Tool Adoption
Table 7 reports how often the agent invokes generated tools across in-domain and out-of-domain benchmarks.
New calls Adoption
In-domain 27% 40.9%
Out-of-domain 15% 16.3%
Table 7: New-tool adoption. New calls: fraction of all tool calls to generated tools. Adoption: fraction of samples invoking ≥\geq1 generated tool.
On in-domain benchmarks, generated tools account for 27% of all tool calls, and 41% of samples invoke at least one, confirming that the agent actively selects generated tools when the query matches their capability. On out-of-domain benchmarks, adoption drops to 15% of calls and 16% of samples, which is expected since the tools were mined from in-domain failures. Nevertheless, the non-trivial OOD adoption indicates that some generated tools generalize beyond their training distribution.
7.3 Qualitative Analysis
We examine the patterns behind gained and lost samples; four illustrated case studies appear in Figures 3–6 (Appendix I), and code-level tool examples in Appendix G.
Why generated tools help.
The dominant pattern is that generated tools enforce a perceive-then-query pipeline that the base agent skips. With only base primitives, the agent often jumps to text search without first identifying the visual entity. Generated tools chain reverse-image search with structured KB lookup in a single call, forcing the correct order. For example, on “What year did he give $50M to create the Hastings Initiative?” (Figure 3), the base agent searches without identifying Reed Hastings and mis-attributes the donation to Eric Schmidt; the generated tool resolves the person first, after which a single text search returns the correct year.
Why generated tools hurt.
Among the lost samples, failures concentrate on a small number of tools that return incorrect information. Other losses stem from visual mis-identification or from the agent trusting a generated tool’s output over a correct result it had already obtained from a base tool. Appendix G walks through one successful tool, one runtime-failing tool, and one tool filtered out by Gate 2 in code-level detail.
Adoption correlates with gain.
The in-domain benchmarks, where adoption is highest (41%), show consistent accuracy improvements, while the lower-adoption OOD benchmarks show smaller or neutral changes, suggesting that the accuracy gains are driven by actual tool use rather than incidental prompt differences.
8 Conclusion
We introduced ToolSmith, an automatic, model-agnostic tool-generation framework for multimodal search agents. Starting from an eight-primitive base tool library, it mines trajectories on a training pool, generates new tools under our proposed ToolSmith framework. Across three in-domain and ten out-of-domain benchmarks, admitted tools improve on top of the base tool library on every benchmark, and gains persist across different inference models, and tool-generation models. Furthermore, we conduct more in-depth analysis on tool generation, tool use, and error samples. ToolSmith is a step toward multimodal search agents that extend their own capabilities with minimal human curation.
Limitations
ToolSmith does not include tools that themselves generate images, such as those introduced by Gen-Searcher (Feng et al., 2026) and Unify-Agent (Chen et al., 2026b); we plan to leave the generative part, together with its safety controls (Zhang et al., 2026a), to future work. We have also not yet utilized a code-specialized LLM as the tool-generator backbone, and we believe a stronger code model would further improve the quality of admitted tools and downstream accuracy. Finally, since the live search APIs and proprietary models change with time, exact numerical reproduction may drift. We pin model snapshots and archive trajectories to partially mitigate this, but building a fully replicable environment for search agents remains worth pursuing in the future.
Ethical Considerations
All datasets we use are publicly released for research and we do not redistribute them. Generated code runs in a process-level sandbox with an AST allow-list and execution timeout, sufficient to block accidental misuse. We cannot control the commercial search APIs and proprietary models. But we have ensured that all of our uses are legal and appropriate. The potential risk comes from the external APIs, which may return harmful content. We have verified and tried our best to mitigate this risk.
Acknowledgments
We thank anonymous reviewers for their helpful comments. This work was partially supported by U.S. ONR grant N00014-23-1-2780, Amazon, and Apple. Chang was supported in part by a grant from DARPA to the Simons Institute for the Theory of Computing.
References
Andrychowicz et al. (2017) Marcin Andrychowicz, Filip Wolski, Alex Ray, Jonas Schneider, Rachel Fong, Peter Welinder, Bob McGrew, Josh Tobin, OpenAI Pieter Abbeel, and Wojciech Zaremba. 2017. Hindsight experience replay. Advances in neural information processing systems, 30.
Bai et al. (2025) Shuai Bai, Yuxuan Cai, Ruizhe Chen, Keqin Chen, Xionghui Chen, Zesen Cheng, Lianghao Deng, Wei Ding, Chang Gao, Chunjiang Ge, and 1 others. 2025. Qwen3-vl technical report. arXiv preprint arXiv:2511.21631.
Beck (1980) Benjamin B. Beck. 1980. Animal Tool Behavior: The Use and Manufacture of Tools by Animals. Garland STPM Press, New York.
Carion et al. (2026) Nicolas Carion, Laura Gustafson, Yuan-Ting Hu, Shoubhik Debnath, Ronghang Hu, Didac Suris Coll-Vinent, Chaitanya Ryali, Kalyan Vasudev Alwala, Haitham Khedr, Andrew Huang, and 1 others. 2026. Sam 3: Segment anything with concepts. In International conference on learning representations, volume 2026, pages 138846–138923.
Chen et al. (2026a) Shuang Chen, Kaituo Feng, Hangting Chen, Wenxuan Huang, Dasen Dai, Quanxin Shou, Yunlong Lin, Xiangyu Yue, Shenghua Gao, and Tianyu Pang. 2026a. Opensearch-vl: An open recipe for frontier multimodal search agents. arXiv preprint arXiv:2605.05185.
Chen et al. (2026b) Shuang Chen, Quanxin Shou, Hangting Chen, Yucheng Zhou, Kaituo Feng, Wenbo Hu, Yi-Fan Zhang, Yunlong Lin, Wenxuan Huang, Mingyang Song, and 1 others. 2026b. Unify-agent: A unified multimodal agent for world-grounded image synthesis. arXiv preprint arXiv:2603.29620.
Chen et al. (2023) Yang Chen, Hexiang Hu, Yi Luan, Haitian Sun, Soravit Changpinyo, Alan Ritter, and Ming-Wei Chang. 2023. Can pre-trained vision and language models answer visual information-seeking questions? In Proceedings of the 2023 Conference on Empirical Methods in Natural Language Processing, pages 14948–14968.
Chen et al. (2025) Zhenfang Chen, Delin Chen, Rui Sun, Wenjun Liu, and Chuang Gan. 2025. Scaling autonomous agents via automatic reward modeling and planning. In International Conference on Learning Representations, volume 2025, pages 29237–29268.
Chen et al. (2024) Zhenfang Chen, Rui Sun, Wenjun Liu, Yining Hong, and Chuang Gan. 2024. Genome: generative neuro-symbolic visual reasoning by growing and reusing modules. In International Conference on Learning Representations, volume 2024, pages 2012–2039.
Cheng et al. (2025) Xianfu Cheng, Wei Zhang, Shiwei Zhang, Jian Yang, Xiangyuan Guan, Xianjie Wu, Xiang Li, Ge Zhang, Jiaheng Liu, Yuying Mai, and 1 others. 2025. Simplevqa: Multimodal factuality evaluation for multimodal large language models. In 2025 IEEE/CVF International Conference on Computer Vision (ICCV), pages 4637–4646. IEEE.
Cui et al. (2025) Cheng Cui, Ting Sun, Suyin Liang, Tingquan Gao, Zelun Zhang, Jiaxuan Liu, Xueqing Wang, Changda Zhou, Hongen Liu, Manhui Lin, and 1 others. 2025. Paddleocr-vl: Boosting multilingual document parsing via a 0.9 b ultra-compact vision-language model. arXiv preprint arXiv:2510.14528.
Feng et al. (2026) Kaituo Feng, Manyuan Zhang, Shuang Chen, Yunlong Lin, Kaixuan Fan, Yilei Jiang, Hongyu Li, Dian Zheng, Chenyang Wang, and Xiangyu Yue. 2026. Gen-searcher: Reinforcing agentic search for image generation. arXiv preprint arXiv:2603.28767.
Fu et al. (2026) Mingyang Fu, Yuyang Peng, Dongping Chen, Zetong Zhou, Benlin Liu, Yao Wan, Zhou Zhao, Philip S Yu, and Ranjay Krishna. 2026. Seeking and updating with live visual knowledge. Advances in Neural Information Processing Systems, 38.
Gao et al. (2025) Zhi Gao, Bofei Zhang, Pengxiang Li, Xiaojian Ma, Tao Yuan, Yue Fan, Yuwei Wu, Yunde Jia, Song-Chun Zhu, and Qing Li. 2025. Multi-modal agent tuning: Building a vlm-driven agent for efficient tool usage. In International Conference on Learning Representations, volume 2025, pages 13354–13385.
Geng et al. (2026) Xinyu Geng, Peng Xia, Zhen Zhang, Xinyu Wang, Qiuchen Wang, Ruixue Ding, Chenxi Wang, Jialong Wu, Kuan Li, Yida Zhao, and 1 others. 2026. Webwatcher: Breaking new frontiers of vision-language deep research agent. In International Conference on Learning Representations, volume 2026, pages 61240–61271.
Goodall (1964) Jane Goodall. 1964. Tool-using
Images from the source



