kb_export
Export your knowledge base data as a JSON string for backup, transfer, or integration with other systems.
Instructions
Export knowledge base as JSON string
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/index.ts:831-841 (handler)Tool handler for 'kb_export' that calls KnowledgeManager.exportKnowledgeBase() and returns the JSON as text content.case 'kb_export': { const data = await km.exportKnowledgeBase(); return { content: [ { type: 'text', text: data } ] }; }
- src/KnowledgeManager.ts:360-362 (helper)Core implementation that serializes the entire knowledge base (this.kb) to a formatted JSON string.async exportKnowledgeBase(): Promise<string> { return JSON.stringify(this.kb, null, 2); }
- src/index.ts:302-309 (schema)Tool definition including name, description, and empty input schema. This object is part of the tools array returned by listTools.{ name: 'kb_export', description: 'Export knowledge base as JSON string', inputSchema: { type: 'object', properties: {} } },
- src/index.ts:423-425 (registration)Registers all tools (including kb_export schema) by setting the ListToolsRequestSchema handler to return the tools array.server.setRequestHandler(ListToolsRequestSchema, async () => { return { tools }; });