recall_knowledge
Search and retrieve relevant information from a specific knowledge base using semantic queries. Returns results ranked by relevance to help users find stored knowledge efficiently.
Instructions
知识库语义搜索:在指定知识库范围内进行语义召回。适用场景:「在我的 XX 知识库搜一下 XX」。返回结果按相关度从高到低排序。需要 note.topic.recall.read scope。
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| topic_id | Yes | 知识库 ID(alias id,来自 list_topics 的 id 字段)(必填) | |
| query | Yes | 搜索关键词或语义描述(必填) | |
| top_k | No | 返回数量,默认 3,最大 10 |
Implementation Reference
- src/client.ts:334-336 (handler)The `recallKnowledge` method in the `client` class performs the actual API request to the knowledge recall endpoint.
async recallKnowledge(body: { topic_id: string; query: string; top_k?: number }) { return this.request<RecallResp>("POST", "/resource/recall/knowledge", undefined, body); } - src/index.ts:723-729 (handler)The switch case handling the 'recall_knowledge' tool request, which maps tool input arguments to the client's `recallKnowledge` method.
case "recall_knowledge": { return client.recallKnowledge({ topic_id: input.topic_id as string, query: input.query as string, top_k: input.top_k as number | undefined, }); } - src/index.ts:522-544 (schema)Tool definition for 'recall_knowledge', including input schema and description.
{ name: "recall_knowledge", description: "知识库语义搜索:在指定知识库范围内进行语义召回。适用场景:「在我的 XX 知识库搜一下 XX」。返回结果按相关度从高到低排序。需要 note.topic.recall.read scope。", inputSchema: { type: "object" as const, properties: { topic_id: { type: "string", description: "知识库 ID(alias id,来自 list_topics 的 id 字段)(必填)", }, query: { type: "string", description: "搜索关键词或语义描述(必填)", }, top_k: { type: "number", description: "返回数量,默认 3,最大 10", default: 3, }, }, required: ["topic_id", "query"], },