openclaw - 💡(How to fix) Fix [Bug]: web_search/web_fetch tools not available to agent with built-in Gemini provider [4 comments, 3 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
openclaw/openclaw#52677Fetched 2026-04-08 01:20:33
View on GitHub
Comments
4
Participants
3
Timeline
14
Reactions
0
Timeline (top)
commented ×4mentioned ×3subscribed ×3labeled ×2

web_search and web_fetch tools are not injected into the agent's toolset when using the built-in Gemini provider via tools.web.search, despite correct configuration. The agent receives 18 tools (with tools.profile: "full") but web tools are absent.

Environment

  • Version: OpenClaw 2026.3.13 (61d171a)
  • OS: Ubuntu, Linux 6.8.0-106-generic x86_64
  • Install: systemd service, non-Docker gateway
  • Sandbox: mode: "all", Docker bridge network
  • Model: gradient/anthropic-claude-4.6-sonnet

Configuration

"tools": { "profile": "full", "allow": ["group:web"], "web": { "search": {
"enabled": true, "provider": "gemini",
"gemini": { "apiKey": "<redacted>" } }, "fetch": { "enabled": true } } }

Error Message

$ journalctl -u openclaw --since "70 minutes ago" | grep -i "web_search|web_fetch|gemini.*tool|error" Severity: Blocks workflow. The agent cannot search the web or fetch URLs despite correct configuration. Users who instruct the agent to search the web get a refusal ("tool isn't available"), with no error or guidance on how to fix it. The

Root Cause

web_search and web_fetch tools are not injected into the agent's toolset when using the built-in Gemini provider via tools.web.search, despite correct configuration. The agent receives 18 tools (with tools.profile: "full") but web tools are absent.

Environment

  • Version: OpenClaw 2026.3.13 (61d171a)
  • OS: Ubuntu, Linux 6.8.0-106-generic x86_64
  • Install: systemd service, non-Docker gateway
  • Sandbox: mode: "all", Docker bridge network
  • Model: gradient/anthropic-claude-4.6-sonnet

Configuration

"tools": { "profile": "full", "allow": ["group:web"], "web": { "search": {
"enabled": true, "provider": "gemini",
"gemini": { "apiKey": "<redacted>" } }, "fetch": { "enabled": true } } }

Fix Action

Fix / Workaround

Agent toolset: read, write, edit, exec, process, find, grep, ls, apply_patch, browser, canvas, nodes, cron, sessions_list, sessions_history, sessions_send, subagents, session_status

read, write, edit, exec, process, find, grep, ls, apply_patch, browser,
canvas, nodes, cron, sessions_list, sessions_history, sessions_send, subagents, session_status

Consequence: Users must fall back to workarounds (curl or openclaw browser via exec) to get any web access, losing the structured search results and grounding that web_search provides. Time spent debugging a silent config failure — in this case the user tried multiple config changes and a gateway restart before concluding it was a bug.

Code Example

1. Tools config output                                                                                                                                                                                                                         
                                                                                                                                                                                                                                                 
  $ openclaw config get tools                                                                                                                                                                                                                    
  {                                                                                                                                                                                                                                              
    "profile": "full",
    "allow": ["group:web"],                                                                                                                                                                                                                      
    "web": {                                                                                                                                                                                                                                     
      "search": {
        "enabled": true,                                                                                                                                                                                                                         
        "provider": "gemini",
        "gemini": { "apiKey": "__OPENCLAW_REDACTED__" }                                                                                                                                                                                          
      },                                                                                                                                                                                                                                         
      "fetch": { "enabled": true }
    },                                                                                                                                                                                                                                           
    "exec": { "host": "gateway", "security": "full", "ask": "off" }
  }                                                                                                                                                                                                                                              
   
  2. Plugins config (no web search plugin — using built-in provider)                                                                                                                                                                             
                  
  $ openclaw config get plugins                                                                                                                                                                                                                  
  {               
    "entries": {
      "whatsapp": { "enabled": true }
    }                                                                                                                                                                                                                                            
  }
                                                                                                                                                                                                                                                 
  3. Sandbox config

  $ openclaw config get agents.defaults.sandbox
  {                                                                                                                                                                                                                                              
    "mode": "all",
    "workspaceAccess": "rw",                                                                                                                                                                                                                     
    "docker": { "network": "bridge" }
  }                                                                                                                                                                                                                                              
   
  4. Agent tool list (before tools.profile: "full"12 tools, no web)                                                                                                                                                                           
                  
  read, write, edit, exec, process, sessions_list, sessions_history,                                                                                                                                                                             
  sessions_send, sessions_spawn, sessions_yield, subagents, session_status

  5. Agent tool list (after tools.profile: "full" + tools.allow: ["group:web"]18 tools, still no web)                                                                                                                                         
   
  read, write, edit, exec, process, find, grep, ls, apply_patch, browser,                                                                                                                                                                        
  canvas, nodes, cron, sessions_list, sessions_history, sessions_send,
  subagents, session_status

  6. Gateway logs — no errors, no web tool registration                                                                                                                                                                                          
   
  $ journalctl -u openclaw --since "70 minutes ago" | grep -i "web_search\|web_fetch\|gemini.*tool\|error"                                                                                                                                       
  (no matches — gateway silently skips web tool injection)                                                                                                                                                                                       
                                                                                                                                                                                                                                                 
  7. Timeline from gateway log                                                                                                                                                                                                                   
                                                                                                                                                                                                                                                 
  05:28User tells agent to use web_search; agent can't find it
  05:40Agent confirms: "The tool isn't available in my current environment"                                                                                                                                                                   
  06:22Agent lists 12 tools, no web_search/web_fetch                                                                                                                                                                                          
  06:31Gateway restarted (config changes: tools.profile="full", tools.allow=["group:web"])                                                                                                                                                    
  06:35Agent still reports no web_search                                                                                                                                                                                                      
  06:56Toolset expanded to 18 (profile change worked) but still no web tools
RAW_BUFFERClick to expand / collapse

Bug type

Regression (worked before, now fails)

Summary

web_search and web_fetch tools are not injected into the agent's toolset when using the built-in Gemini provider via tools.web.search, despite correct configuration. The agent receives 18 tools (with tools.profile: "full") but web tools are absent.

Environment

  • Version: OpenClaw 2026.3.13 (61d171a)
  • OS: Ubuntu, Linux 6.8.0-106-generic x86_64
  • Install: systemd service, non-Docker gateway
  • Sandbox: mode: "all", Docker bridge network
  • Model: gradient/anthropic-claude-4.6-sonnet

Configuration

"tools": { "profile": "full", "allow": ["group:web"], "web": { "search": {
"enabled": true, "provider": "gemini",
"gemini": { "apiKey": "<redacted>" } }, "fetch": { "enabled": true } } }

Steps to reproduce

  1. Configure tools.web.search.enabled: true with provider: "gemini" and valid API key
  2. Set tools.profile: "full" and tools.allow: ["group:web"]
  3. Restart gateway
  4. Ask agent to list available tools

Expected behavior

Agent toolset includes web_search and web_fetch.

Actual behavior

Agent toolset: read, write, edit, exec, process, find, grep, ls, apply_patch, browser, canvas, nodes, cron, sessions_list, sessions_history, sessions_send, subagents, session_status

No web_search or web_fetch despite config being correct.

OpenClaw version

2026.3.13 (61d171a)

Operating system

Ubuntu, Linux 6.8.0-106-generic x86_64

Install method

DigitalOcean 1click Deploy

Model

gradient/anthropic-claude-4.6-sonnet

Provider / routing chain

Gradient (DigitalOcean AI) → https://inference.do-ai.run/v1 → anthropic-claude-4.6-sonnet (OpenAI-compatible completions API)

Additional provider/model setup details

No response

Logs, screenshots, and evidence

1. Tools config output                                                                                                                                                                                                                         
                                                                                                                                                                                                                                                 
  $ openclaw config get tools                                                                                                                                                                                                                    
  {                                                                                                                                                                                                                                              
    "profile": "full",
    "allow": ["group:web"],                                                                                                                                                                                                                      
    "web": {                                                                                                                                                                                                                                     
      "search": {
        "enabled": true,                                                                                                                                                                                                                         
        "provider": "gemini",
        "gemini": { "apiKey": "__OPENCLAW_REDACTED__" }                                                                                                                                                                                          
      },                                                                                                                                                                                                                                         
      "fetch": { "enabled": true }
    },                                                                                                                                                                                                                                           
    "exec": { "host": "gateway", "security": "full", "ask": "off" }
  }                                                                                                                                                                                                                                              
   
  2. Plugins config (no web search plugin — using built-in provider)                                                                                                                                                                             
                  
  $ openclaw config get plugins                                                                                                                                                                                                                  
  {               
    "entries": {
      "whatsapp": { "enabled": true }
    }                                                                                                                                                                                                                                            
  }
                                                                                                                                                                                                                                                 
  3. Sandbox config

  $ openclaw config get agents.defaults.sandbox
  {                                                                                                                                                                                                                                              
    "mode": "all",
    "workspaceAccess": "rw",                                                                                                                                                                                                                     
    "docker": { "network": "bridge" }
  }                                                                                                                                                                                                                                              
   
  4. Agent tool list (before tools.profile: "full"12 tools, no web)                                                                                                                                                                           
                  
  read, write, edit, exec, process, sessions_list, sessions_history,                                                                                                                                                                             
  sessions_send, sessions_spawn, sessions_yield, subagents, session_status

  5. Agent tool list (after tools.profile: "full" + tools.allow: ["group:web"]18 tools, still no web)                                                                                                                                         
   
  read, write, edit, exec, process, find, grep, ls, apply_patch, browser,                                                                                                                                                                        
  canvas, nodes, cron, sessions_list, sessions_history, sessions_send,
  subagents, session_status

  6. Gateway logs — no errors, no web tool registration                                                                                                                                                                                          
   
  $ journalctl -u openclaw --since "70 minutes ago" | grep -i "web_search\|web_fetch\|gemini.*tool\|error"                                                                                                                                       
  (no matches — gateway silently skips web tool injection)                                                                                                                                                                                       
                                                                                                                                                                                                                                                 
  7. Timeline from gateway log                                                                                                                                                                                                                   
                                                                                                                                                                                                                                                 
  05:28 — User tells agent to use web_search; agent can't find it
  05:40 — Agent confirms: "The tool isn't available in my current environment"                                                                                                                                                                   
  06:22 — Agent lists 12 tools, no web_search/web_fetch                                                                                                                                                                                          
  06:31 — Gateway restarted (config changes: tools.profile="full", tools.allow=["group:web"])                                                                                                                                                    
  06:35 — Agent still reports no web_search                                                                                                                                                                                                      
  06:56 — Toolset expanded to 18 (profile change worked) but still no web tools

Impact and severity

Affected users/systems: Any OpenClaw deployment using a built-in web search provider (Gemini in this case) rather than a plugin-based provider (Brave). The agent on all channels (WhatsApp, web dashboard) is affected — the tool is missing
from the toolset entirely, not channel-specific.

Severity: Blocks workflow. The agent cannot search the web or fetch URLs despite correct configuration. Users who instruct the agent to search the web get a refusal ("tool isn't available"), with no error or guidance on how to fix it. The config appears valid and no errors are logged, making this difficult to self-diagnose.

Frequency: Always. Reproducible across gateway restarts, config changes (tools.profile: "full", tools.allow: ["group:web"]), and multiple agent sessions. The tool never appears in the agent's toolset.

Consequence: Users must fall back to workarounds (curl or openclaw browser via exec) to get any web access, losing the structured search results and grounding that web_search provides. Time spent debugging a silent config failure — in this case the user tried multiple config changes and a gateway restart before concluding it was a bug.

Additional information

Diagnostics

  • openclaw config get tools.web.search confirms correct config
  • No errors in gateway logs (journalctl -u openclaw) related to web tools or Gemini
  • Zero mentions of web_search/web_fetch in /tmp/openclaw/openclaw-2026-03-23.log
  • Setting tools.profile: "full" expanded toolset from 12 to 18 but did not add web tools
  • Adding tools.allow: ["group:web"] had no effect

Likely Related

  • #51937 — same symptom (web_search absent from agent tools) but for Brave plugin
  • PR #52072 fixes Brave by adding it to BUNDLED_ENABLED_BY_DEFAULT, but the fix is plugin-specific and doesn't cover built-in providers like Gemini

The isToolAllowedByPolicies code path identified in #51937 may also be filtering out web tools for built-in providers, but through a different registration path than plugins.

extent analysis

Fix Plan

To fix the issue of web_search and web_fetch tools not being injected into the agent's toolset, we need to modify the isToolAllowedByPolicies code path to include built-in providers like Gemini.

Here are the steps to follow:

  • Modify the tools/web.py file to include the Gemini provider in the BUNDLED_ENABLED_BY_DEFAULT list.
  • Update the isToolAllowedByPolicies function to check for built-in providers.
  • Restart the gateway service after making the changes.

Example code changes:

# tools/web.py
BUNDLED_ENABLED_BY_DEFAULT = [
    # ... existing providers ...
    'gemini',  # add Gemini provider to the list
]

# ... existing code ...

def isToolAllowedByPolicies(tool_name, tool_config):
    # ... existing code ...
    if tool_name in ['web_search', 'web_fetch'] and tool_config['provider'] == 'gemini':
        # allow Gemini provider for web_search and web_fetch tools
        return True
    # ... existing code ...

Verification

To verify that the fix worked, follow these steps:

  • Restart the gateway service.
  • Ask the agent to list available tools.
  • Check if web_search and web_fetch are included in the toolset.

Example command to check available tools:

$ openclaw config get tools

Extra Tips

  • Make sure to update the BUNDLED_ENABLED_BY_DEFAULT list with the correct provider name (in this case, 'gemini').
  • If you're using a different built-in provider, update the isToolAllowedByPolicies function accordingly.
  • After making the changes, restart the gateway service to apply the updates.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

FAQ

Expected behavior

Agent toolset includes web_search and web_fetch.

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

openclaw - 💡(How to fix) Fix [Bug]: web_search/web_fetch tools not available to agent with built-in Gemini provider [4 comments, 3 participants]