kb_get_all
Retrieve the complete knowledge base in formatted JSON, enabling access to stored personal and organizational context for AI applications.
Instructions
Get complete knowledge base as formatted JSON
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| format | No | full |
Implementation Reference
- src/index.ts:635-690 (handler)The handler function for the 'kb_get_all' tool. Retrieves the full knowledge base from KnowledgeManager and formats it as JSON based on the 'format' parameter (full, summary, or categories). Returns the result as a text content block.case 'kb_get_all': { const format = (args as any).format || 'full'; const kb = km.getKnowledgeBase(); let result: any; if (format === 'summary') { result = { personal: { name: kb.personal.name, location: kb.personal.currentLocation, languages: kb.personal.languages }, professional: { occupation: kb.professional.occupation, experience: kb.professional.yearsOfExperience, skills: kb.professional.skills }, preferences: { communicationStyle: kb.preferences.communicationStyle, technicalLevel: kb.preferences.technicalLevel }, projects: { current: kb.projects.currentProjects, technologies: kb.projects.technologies }, customCategories: [...new Set(kb.custom.map(c => c.category))] }; } else if (format === 'categories') { result = { categories: { personal: Object.keys(kb.personal).filter(k => (kb.personal as any)[k] !== undefined), professional: Object.keys(kb.professional).filter(k => (kb.professional as any)[k] !== undefined), preferences: Object.keys(kb.preferences).filter(k => (kb.preferences as any)[k] !== undefined), projects: Object.keys(kb.projects).filter(k => (kb.projects as any)[k] !== undefined), custom: [...new Set(kb.custom.map(c => c.category))] } }; } else { result = { personal: kb.personal, professional: kb.professional, preferences: kb.preferences, projects: kb.projects, custom: kb.custom }; } return { content: [ { type: 'text', text: JSON.stringify(result, null, 2) } ] }; }
- src/index.ts:193-206 (registration)Tool registration entry in the tools array, including name, description, and input schema. This is returned by the ListToolsRequestHandler.{ name: 'kb_get_all', description: 'Get complete knowledge base as formatted JSON', inputSchema: { type: 'object', properties: { format: { type: 'string', enum: ['full', 'summary', 'categories'], default: 'full' } } } },
- src/index.ts:196-205 (schema)Input schema definition for the kb_get_all tool, specifying the optional 'format' parameter.inputSchema: { type: 'object', properties: { format: { type: 'string', enum: ['full', 'summary', 'categories'], default: 'full' } } }