openclaw - 💡(How to fix) Fix web_search: maxResults hardcoded to 5, should be configurable via tools.web.search.maxResults

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…

Fix Action

Workaround

Currently using node search.mjs -n 10 --engine searxng from the web-search-pro skill as a workaround, but this bypasses the native tool interface.

Code Example

gateway config.patch cannot change protected config paths: maxResults, timeoutSeconds
RAW_BUFFERClick to expand / collapse

Problem

The web_search tool hardcodes maxResults: 5 and the schema validation blocks attempts to override it via gateway config.patch:

gateway config.patch cannot change protected config paths: maxResults, timeoutSeconds

Even though tools.web.search.maxResults is documented and appears in the config schema, the value is protected and cannot be changed at runtime.

Expected Behavior

tools.web.search.maxResults should be configurable like other tool settings (e.g. apiKey, timeoutSeconds).

The schema hint already defines the field:

  • Type: integer
  • Range: 1-10
  • But marked protected, cannot patch

Impact

  • Users with self-hosted SearXNG instances (which supports 20+ results) are limited to 5 results in the native web_search tool
  • The web-search-pro skill's search.mjs accepts -n parameter up to 20, proving the backend supports more results
  • For research-heavy workflows, 5 results is often insufficient

Suggested Fix

Remove maxResults and timeoutSeconds from the protected config paths list, or expose them as configurable fields in the schema.

Workaround

Currently using node search.mjs -n 10 --engine searxng from the web-search-pro skill as a workaround, but this bypasses the native tool interface.

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