batch_add_notes_to_topic
Add multiple notes to a knowledge base in batches of up to 20 at once. This tool organizes content efficiently by grouping related notes together.
Instructions
批量将笔记添加到知识库(每批最多 20 个)。
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| topic_id | Yes | 知识库 ID | |
| note_ids | Yes | 笔记 ID 列表(最多 20 个) |
Implementation Reference
- src/client.ts:256-261 (handler)The actual implementation of batch_add_notes_to_topic, which sends a POST request to the server.
async batchAddNotesToTopic(body: { topic_id: string; note_ids: (number | string)[] }) { return this.request<BatchAddNotesResp>( "POST", "/resource/knowledge/note/batch-add", undefined, body - src/index.ts:291-303 (registration)The MCP tool definition and registration for batch_add_notes_to_topic.
name: "batch_add_notes_to_topic", description: "批量将笔记添加到知识库(每批最多 20 个)。", inputSchema: { type: "object" as const, properties: { topic_id: { type: "string", description: "知识库 ID", }, note_ids: { type: "array", items: { type: ["number", "string"] }, description: "笔记 ID 列表(最多 20 个)", - src/index.ts:629-634 (handler)The switch case handler that calls the client method when the batch_add_notes_to_topic tool is invoked.
case "batch_add_notes_to_topic": { return client.batchAddNotesToTopic({ topic_id: input.topic_id as string, note_ids: input.note_ids as (number | string)[], }); }