search_knowledge
Search lessons, decisions, and playbooks by keyword to retrieve relevant past knowledge during conversations and find procedures or prior decisions.
Instructions
搜索知识库(lessons/decisions/playbooks)。 / Search lessons, decisions, and playbooks by keyword.
**Lifecycle: retrieval** — 在对话中需要检索历史知识时调用。
Lifecycle: retrieval — call during conversation when past knowledge is needed.
Call when the user asks to find knowledge about a specific topic,
or recalls a procedure ('X how to' / 'X steps').
Result groups: "lessons" / "decisions" / "playbooks" hold reviewed, current
items only. Items still waiting for the user's review come back separately
under "pending" (same three lists, each item flagged pending_untrusted=true):
treat them as unconfirmed proposals, not as the user's rules. Items replaced
by a newer version are left out unless include_superseded=true, which adds a
separate "superseded" group (each item names superseded_by).
If you only have a project path and no query, use get_relevant_knowledge;
if you have an existing knowledge ID, use explore_knowledge(mode="similar").
Args:
query: Search query keywords.
scope: Search scope: 'all', 'lessons', 'decisions', or 'playbooks'.
limit: Maximum number of items to return (default 10).
filters_json: Optional JSON string with filter criteria. Supported keys:
- "domain": str — only items whose domain contains this value
- "tier": str — only items matching this tier ('staging' or 'verified')
- "date_after": str — ISO date string, only items created after this date
Example: '{"tier": "verified", "domain": "python"}'
include_freshness: Attach a per-item freshness hint (fresh/aging/stale)
to each returned item. Default False keeps the response unchanged.
max_field_chars: Per-field size cap. Every string field in each returned
item (detail/reasoning/description/steps/...) longer than this is
clipped with a "[+N chars truncated]" marker so a few large bodies
cannot blow up the client. Item shape, ids, and headlines are kept.
Set 0 for full untruncated bodies (default 400).
include_superseded: Also return items replaced by a newer version, in a
separate "superseded" group (default False).
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"query": "<query>"
},
"name": "search_knowledge"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | ||
| query | Yes | ||
| scope | No | all | |
| filters_json | No | ||
| project_folder | No | ||
| max_field_chars | No | ||
| include_freshness | No | ||
| include_superseded | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |