openclaw - 💡(How to fix) Fix Bug: HTTP API /tools/invoke returns 'Tool not available: browser' [1 comments, 1 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#68874Fetched 2026-04-19 15:06:41
View on GitHub
Comments
1
Participants
1
Timeline
2
Reactions
0
Author
Participants
Timeline (top)
closed ×1commented ×1

The browser tool cannot be invoked via HTTP API /tools/invoke, returning {"ok":false,"error":{"type":"not_found","message":"Tool not available: browser"}}. However, the same tool works correctly when called directly in a WebSocket session or from within the agent.

Error Message

The browser tool cannot be invoked via HTTP API /tools/invoke, returning {"ok":false,"error":{"type":"not_found","message":"Tool not available: browser"}}. However, the same tool works correctly when called directly in a WebSocket session or from within the agent. 3. Observe response: {"ok":false,"error":{"type":"not_found","message":"Tool not available: browser"}}

Root Cause

The bug is in src/gateway/tools-invoke-http.ts:

const { agentId, tools } = resolveGatewayScopedTools({
    // ...
    disablePluginTools: isKnownCoreToolId(toolName),  // <-- Problem here
    // ...
});

The logic flow:

  1. browser is defined in CORE_TOOL_DEFINITIONS with profiles: [] (see src/agents/tool-catalog.ts)
  2. This makes isKnownCoreToolId("browser") return true
  3. disablePluginTools is set to true, blocking all plugin tools from being loaded
  4. However, browser's actual implementation comes only from the plugin (there is no createBrowserTool in core)
  5. Result: browser tool is not found in the tools list

Code Example

curl -X POST http://127.0.0.1:18789/tools/invoke \
     -H "Authorization: Bearer $GATEWAY_TOKEN" \
     -H "Content-Type: application/json" \
     -d '{"tool":"browser","action":"status","args":{}}'

---

const { agentId, tools } = resolveGatewayScopedTools({
    // ...
    disablePluginTools: isKnownCoreToolId(toolName),  // <-- Problem here
    // ...
});

---

// Before (line ~153)
disablePluginTools: isKnownCoreToolId(toolName),

// After
disablePluginTools: isKnownCoreToolId(toolName) && toolName !== "browser",
RAW_BUFFERClick to expand / collapse

Bug: HTTP API /tools/invoke returns "Tool not available: browser"

Summary

The browser tool cannot be invoked via HTTP API /tools/invoke, returning {"ok":false,"error":{"type":"not_found","message":"Tool not available: browser"}}. However, the same tool works correctly when called directly in a WebSocket session or from within the agent.

Steps to Reproduce

  1. Start OpenClaw Gateway with browser plugin enabled
  2. Call HTTP API:
    curl -X POST http://127.0.0.1:18789/tools/invoke \
      -H "Authorization: Bearer $GATEWAY_TOKEN" \
      -H "Content-Type: application/json" \
      -d '{"tool":"browser","action":"status","args":{}}'
  3. Observe response: {"ok":false,"error":{"type":"not_found","message":"Tool not available: browser"}}

Expected Behavior

The browser tool should be available via HTTP API and return its status, similar to other tools like sessions_list which work correctly.

Root Cause Analysis

The bug is in src/gateway/tools-invoke-http.ts:

const { agentId, tools } = resolveGatewayScopedTools({
    // ...
    disablePluginTools: isKnownCoreToolId(toolName),  // <-- Problem here
    // ...
});

The logic flow:

  1. browser is defined in CORE_TOOL_DEFINITIONS with profiles: [] (see src/agents/tool-catalog.ts)
  2. This makes isKnownCoreToolId("browser") return true
  3. disablePluginTools is set to true, blocking all plugin tools from being loaded
  4. However, browser's actual implementation comes only from the plugin (there is no createBrowserTool in core)
  5. Result: browser tool is not found in the tools list

Evidence

  • canvas (also profiles: []) returns tool_error instead of not_found because it has a core implementation (createCanvasTool)
  • browser has NO core implementation - it relies entirely on the plugin
  • Other tools like sessions_list work correctly via HTTP API

Suggested Fix

Modify src/gateway/tools-invoke-http.ts:

// Before (line ~153)
disablePluginTools: isKnownCoreToolId(toolName),

// After
disablePluginTools: isKnownCoreToolId(toolName) && toolName !== "browser",

Alternatively, consider removing browser from CORE_TOOL_DEFINITIONS since its implementation is plugin-only.

Environment

  • OpenClaw version: 2026.4.15
  • Platform: Windows
  • Node.js: v24.x

Related Files

  • src/gateway/tools-invoke-http.ts - HTTP API endpoint
  • src/agents/tool-catalog.ts - CORE_TOOL_DEFINITIONS (browser entry)
  • src/plugins/tools.ts - Plugin tool loading logic

extent analysis

TL;DR

Modify the disablePluginTools logic in src/gateway/tools-invoke-http.ts to exclude the browser tool.

Guidance

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…

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: HTTP API /tools/invoke returns 'Tool not available: browser' [1 comments, 1 participants]