Skip to content

Garry's Opinionated OpenClaw/Hermes Agent Brain

TypeScript

fix(mcp): query description fits the served starter budget after the master merge (25,020 -> 24,993 characters)

garrytana02774947028
diff --git a/docs/TOOL_CATALOG.md b/docs/TOOL_CATALOG.md
index db03d30691..36d36b4a3d 100644
--- a/docs/TOOL_CATALOG.md
+++ b/docs/TOOL_CATALOG.md
@@ -218,7 +218,7 @@ Every non-localOnly operation on the MCP surface: 149 tools across 25 areas. **S
|---|---|---|---|---|
| `assemble_evidence` | Deliver whole evidence for an ordered list of search hits (each {source_id, slug, chunk_id} from a prior search/query result): the same windows, sections or pages `query` returns with return_unit, packed into token_budget. | read | | |
| `cache_stats` | Semantic query-cache introspection: resolved knobs (enabled, similarity threshold, TTL) plus row counts and total hits. | admin | | |
-| `query` | Hybrid search plus multi-query expansion for concept or landscape questions (expansion recovers synonyms). | read | yes | |
+| `query` | Hybrid search plus multi-query expansion for concept/landscape questions (expansion recovers synonyms). | read | yes | |
| `rate_answer` | Rate how useful an answer's retrieved evidence was, so this brain ranks better next time (zero LLM calls). | write | | |
| `search` | Cheap hybrid search, no LLM expansion, top 20: exact tokens, names, field values. | read | yes | |
| `search_by_image` | Image-as-query retrieval. | read | | |
diff --git a/src/core/operation-manifest.generated.ts b/src/core/operation-manifest.generated.ts
index b5c736178c..2131fc6e05 100644
--- a/src/core/operation-manifest.generated.ts
+++ b/src/core/operation-manifest.generated.ts
@@ -963,7 +963,7 @@ export const OPERATION_MANIFEST: OperationMeta[] = [
"name": "query",
"idempotent": true,
"outputRedaction": "retrieval",
- "description": "Hybrid search plus multi-query expansion for concept or landscape questions (expansion recovers synonyms). Still top-K; return_unit: whole sections or conversations. Lists: list_pages. Exact tokens: `search` is cheaper (no LLM call). Personal: get_recent_salience, find_anomalies; transcripts: host `gbrain transcripts recent`. Do NOT assume 'crazy' means impressive (often difficult or emotionally charged). Needs an embedding key (else keyword-only); expansion needs a chat key. Fact rows aren't pages: use follow_up. fields: \"full\" adds diagnostics.",
+ "description": "Hybrid search plus multi-query expansion for concept/landscape questions (expansion recovers synonyms). Still top-K; return_unit: sections or conversations. Lists: list_pages. Exact tokens: `search` is cheaper (no LLM call). Personal: get_recent_salience, find_anomalies; transcripts: `gbrain transcripts recent`. Do NOT assume 'crazy' means impressive (often difficult or emotionally charged). Needs an embedding key (else keyword-only); expansion needs a chat key. Fact rows: use follow_up. fields: \"full\" adds diagnostics.",
"params": {
"query": {
"type": "string",
diff --git a/src/core/operations-descriptions.ts b/src/core/operations-descriptions.ts
index 183d88a8ea..26fb790a26 100644
--- a/src/core/operations-descriptions.ts
+++ b/src/core/operations-descriptions.ts
@@ -49,7 +49,7 @@ export const LIST_PAGES_DESCRIPTION =
"List pages with filters. For 'what's recent / what did I touch this week' use sort=updated_desc. Default 50 rows; a full page may be truncated: continue with updated_after + updated_after_slug from the last row.";
export const QUERY_DESCRIPTION =
- "Hybrid search plus multi-query expansion for concept or landscape questions (expansion recovers synonyms). Still top-K; return_unit: whole sections or conversations. Lists: list_pages. Exact tokens: `search` is cheaper (no LLM call). Personal: get_recent_salience, find_anomalies; transcripts: host `gbrain transcripts recent`. Do NOT assume 'crazy' means impressive (often difficult or emotionally charged). Needs an embedding key (else keyword-only); expansion needs a chat key. Fact rows aren't pages: use follow_up. fields: \"full\" adds diagnostics.";
+ "Hybrid search plus multi-query expansion for concept/landscape questions (expansion recovers synonyms). Still top-K; return_unit: sections or conversations. Lists: list_pages. Exact tokens: `search` is cheaper (no LLM call). Personal: get_recent_salience, find_anomalies; transcripts: `gbrain transcripts recent`. Do NOT assume 'crazy' means impressive (often difficult or emotionally charged). Needs an embedding key (else keyword-only); expansion needs a chat key. Fact rows: use follow_up. fields: \"full\" adds diagnostics.";
export const SEARCH_DESCRIPTION =
"Cheap hybrid search, no LLM expansion, top 20: exact tokens, names, field values. NOT proof of coverage; match: \"keyword\" pages every keyword match and takes OR across quoted names or codes (\"A\" OR \"B\" OR …): one call lists every page matching any. Name lists: entity names. Concepts or landscape: `query`; lists: list_pages; personal: get_recent_salience. return_unit: sections or conversations. fields: \"full\" adds diagnostics.";
diff --git a/test/fixtures/goldens/cli/help-and-errors.json b/test/fixtures/goldens/cli/help-and-errors.json
index 93c52ce490..4a4310b130 100644
--- a/test/fixtures/goldens/cli/help-and-errors.json
+++ b/test/fixtures/goldens/cli/help-and-errors.json
@@ -685,7 +685,7 @@
"stdout": [
"Usage: gbrain query <query> [options]",
"",
- "Hybrid search plus multi-query expansion for concept or landscape questions (expansion recovers synonyms). Still top-K; return_unit: whole sections or conversations. Lists: list_pages. Exact tokens: `search` is cheaper (no LLM call). Personal: get_recent_salience, find_anomalies; transcripts: host `gbrain transcripts recent`. Do NOT assume 'crazy' means impressive (often difficult or emotionally charged). Needs an embedding key (else keyword-only); expansion needs a chat key. Fact rows aren't pages: use follow_up. fields: \"full\" adds diagnostics.",
+ "Hybrid search plus multi-query expansion for concept/landscape questions (expansion recovers synonyms). Still top-K; return_unit: sections or conversations. Lists: list_pages. Exact tokens: `search` is cheaper (no LLM call). Personal: get_recent_salience, find_anomalies; transcripts: `gbrain transcripts recent`. Do NOT assume 'crazy' means impressive (often difficult or emotionally charged). Needs an embedding key (else keyword-only); expansion needs a chat key. Fact rows: use follow_up. fields: \"full\" adds diagnostics.",
"",
"Options:",
" <query> Question or topic (required unless image).",
diff --git a/test/fixtures/goldens/cli/tools-json.json b/test/fixtures/goldens/cli/tools-json.json
index 171249b9f4..a137f7e0d8 100644
--- a/test/fixtures/goldens/cli/tools-json.json
+++ b/test/fixtures/goldens/cli/tools-json.json
@@ -2,8 +2,8 @@
"golden": {
"exitCode": 0,
"stderr": "",
- "stdoutBytes": 230635,
- "stdoutSha256": "3240fe9a71ad0e2371e26767aed77cb0bfae9ac9dd2af63f7c95b21af233062d",
+ "stdoutBytes": 230608,
+ "stdoutSha256": "75b28bcdd27679c0fd433e18eeeabe788db7cbb5cb28c7b2c5e71ef56f7f8963",
"toolNames": [
"remember",
"entity",
@@ -1232,7 +1232,7 @@
"scope": "read"
},
{
- "description": "Hybrid search plus multi-query expansion for concept or landscape questions (expansion recovers synonyms). Still top-K; return_unit: whole sections or conversations. Lists: list_pages. Exact tokens: `search` is cheaper (no LLM call). Personal: get_recent_salience, find_anomalies; transcripts: host `gbrain transcripts recent`. Do NOT assume 'crazy' means impressive (often difficult or emotionally charged). Needs an embedding key (else keyword-only); expansion needs a chat key. Fact rows aren't pages: use follow_up. fields: \"full\" adds diagnostics.",
+ "description": "Hybrid search plus multi-query expansion for concept/landscape questions (expansion recovers synonyms). Still top-K; return_unit: sections or conversations. Lists: list_pages. Exact tokens: `search` is cheaper (no LLM call). Personal: get_recent_salience, find_anomalies; transcripts: `gbrain transcripts recent`. Do NOT assume 'crazy' means impressive (often difficult or emotionally charged). Needs an embedding key (else keyword-only); expansion needs a chat key. Fact rows: use follow_up. fields: \"full\" adds diagnostics.",
"idempotent": true,
"local_only": false,
"mutating": false,