mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-06 11:00:42 +00:00
docs(tools): convert search and web-fetch param tables to ParamField
This commit is contained in:
@@ -54,17 +54,41 @@ Legacy `tools.web.search.apiKey` still loads through the compatibility shim, but
|
||||
|
||||
## Tool parameters
|
||||
|
||||
| Parameter | Description |
|
||||
| ------------- | ------------------------------------------------------------------- |
|
||||
| `query` | Search query (required) |
|
||||
| `count` | Number of results to return (1-10, default: 5) |
|
||||
| `country` | 2-letter ISO country code (e.g., "US", "DE") |
|
||||
| `language` | ISO 639-1 language code for search results (e.g., "en", "de", "fr") |
|
||||
| `search_lang` | Brave search-language code (e.g., `en`, `en-gb`, `zh-hans`) |
|
||||
| `ui_lang` | ISO language code for UI elements |
|
||||
| `freshness` | Time filter: `day` (24h), `week`, `month`, or `year` |
|
||||
| `date_after` | Only results published after this date (YYYY-MM-DD) |
|
||||
| `date_before` | Only results published before this date (YYYY-MM-DD) |
|
||||
<ParamField path="query" type="string" required>
|
||||
Search query.
|
||||
</ParamField>
|
||||
|
||||
<ParamField path="count" type="number" default="5">
|
||||
Number of results to return (1–10).
|
||||
</ParamField>
|
||||
|
||||
<ParamField path="country" type="string">
|
||||
2-letter ISO country code (e.g. `US`, `DE`).
|
||||
</ParamField>
|
||||
|
||||
<ParamField path="language" type="string">
|
||||
ISO 639-1 language code for search results (e.g. `en`, `de`, `fr`).
|
||||
</ParamField>
|
||||
|
||||
<ParamField path="search_lang" type="string">
|
||||
Brave search-language code (e.g. `en`, `en-gb`, `zh-hans`).
|
||||
</ParamField>
|
||||
|
||||
<ParamField path="ui_lang" type="string">
|
||||
ISO language code for UI elements.
|
||||
</ParamField>
|
||||
|
||||
<ParamField path="freshness" type="'day' | 'week' | 'month' | 'year'">
|
||||
Time filter — `day` is 24 hours.
|
||||
</ParamField>
|
||||
|
||||
<ParamField path="date_after" type="string">
|
||||
Only results published after this date (`YYYY-MM-DD`).
|
||||
</ParamField>
|
||||
|
||||
<ParamField path="date_before" type="string">
|
||||
Only results published before this date (`YYYY-MM-DD`).
|
||||
</ParamField>
|
||||
|
||||
**Examples:**
|
||||
|
||||
|
||||
@@ -64,12 +64,21 @@ Optional plugin-level settings for region and SafeSearch:
|
||||
|
||||
## Tool parameters
|
||||
|
||||
| Parameter | Description |
|
||||
| ------------ | ---------------------------------------------------------- |
|
||||
| `query` | Search query (required) |
|
||||
| `count` | Results to return (1-10, default: 5) |
|
||||
| `region` | DuckDuckGo region code (e.g. `us-en`, `uk-en`, `de-de`) |
|
||||
| `safeSearch` | SafeSearch level: `strict`, `moderate` (default), or `off` |
|
||||
<ParamField path="query" type="string" required>
|
||||
Search query.
|
||||
</ParamField>
|
||||
|
||||
<ParamField path="count" type="number" default="5">
|
||||
Results to return (1–10).
|
||||
</ParamField>
|
||||
|
||||
<ParamField path="region" type="string">
|
||||
DuckDuckGo region code (e.g. `us-en`, `uk-en`, `de-de`).
|
||||
</ParamField>
|
||||
|
||||
<ParamField path="safeSearch" type="'strict' | 'moderate' | 'off'" default="moderate">
|
||||
SafeSearch level.
|
||||
</ParamField>
|
||||
|
||||
Region and SafeSearch can also be set in plugin config (see above) — tool
|
||||
parameters override config values per-query.
|
||||
|
||||
@@ -58,15 +58,33 @@ For a gateway install, put it in `~/.openclaw/.env`.
|
||||
|
||||
## Tool parameters
|
||||
|
||||
| Parameter | Description |
|
||||
| ------------- | ----------------------------------------------------------------------------- |
|
||||
| `query` | Search query (required) |
|
||||
| `count` | Results to return (1-100) |
|
||||
| `type` | Search mode: `auto`, `neural`, `fast`, `deep`, `deep-reasoning`, or `instant` |
|
||||
| `freshness` | Time filter: `day`, `week`, `month`, or `year` |
|
||||
| `date_after` | Results after this date (YYYY-MM-DD) |
|
||||
| `date_before` | Results before this date (YYYY-MM-DD) |
|
||||
| `contents` | Content extraction options (see below) |
|
||||
<ParamField path="query" type="string" required>
|
||||
Search query.
|
||||
</ParamField>
|
||||
|
||||
<ParamField path="count" type="number">
|
||||
Results to return (1–100).
|
||||
</ParamField>
|
||||
|
||||
<ParamField path="type" type="'auto' | 'neural' | 'fast' | 'deep' | 'deep-reasoning' | 'instant'">
|
||||
Search mode.
|
||||
</ParamField>
|
||||
|
||||
<ParamField path="freshness" type="'day' | 'week' | 'month' | 'year'">
|
||||
Time filter.
|
||||
</ParamField>
|
||||
|
||||
<ParamField path="date_after" type="string">
|
||||
Results after this date (`YYYY-MM-DD`).
|
||||
</ParamField>
|
||||
|
||||
<ParamField path="date_before" type="string">
|
||||
Results before this date (`YYYY-MM-DD`).
|
||||
</ParamField>
|
||||
|
||||
<ParamField path="contents" type="object">
|
||||
Content extraction options (see below).
|
||||
</ParamField>
|
||||
|
||||
### Content extraction
|
||||
|
||||
|
||||
@@ -25,11 +25,17 @@ await web_fetch({ url: "https://example.com/article" });
|
||||
|
||||
## Tool parameters
|
||||
|
||||
| Parameter | Type | Description |
|
||||
| ------------- | -------- | ---------------------------------------- |
|
||||
| `url` | `string` | URL to fetch (required, http/https only) |
|
||||
| `extractMode` | `string` | `"markdown"` (default) or `"text"` |
|
||||
| `maxChars` | `number` | Truncate output to this many chars |
|
||||
<ParamField path="url" type="string" required>
|
||||
URL to fetch. `http(s)` only.
|
||||
</ParamField>
|
||||
|
||||
<ParamField path="extractMode" type="'markdown' | 'text'" default="markdown">
|
||||
Output format after main-content extraction.
|
||||
</ParamField>
|
||||
|
||||
<ParamField path="maxChars" type="number">
|
||||
Truncate output to this many characters.
|
||||
</ParamField>
|
||||
|
||||
## How it works
|
||||
|
||||
|
||||
Reference in New Issue
Block a user