kb_initialize
Initialize or check knowledge base status to determine if onboarding is needed and retrieve current profile summary for AI context management.
Instructions
Initialize or check knowledge base status. Returns current profile summary and whether onboarding is needed.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| profileId | No | Profile ID to use (default: "default") | default |
Implementation Reference
- src/index.ts:440-465 (handler)Handler for the kb_initialize tool. Checks if the knowledge base is new using KnowledgeManager, retrieves the current knowledge base status, and returns a JSON summary including profile details and onboarding needs.case 'kb_initialize': { const isNew = km.isNew(); const kb = km.getKnowledgeBase(); return { content: [ { type: 'text', text: JSON.stringify({ status: 'initialized', isNew, needsOnboarding: isNew, profile: { id: kb.id, createdAt: kb.createdAt, lastUpdated: kb.lastUpdated, hasPersonal: Object.keys(kb.personal).length > 0, hasProfessional: Object.keys(kb.professional).length > 0, hasPreferences: Object.keys(kb.preferences).length > 0, hasProjects: Object.keys(kb.projects).length > 0, customCategories: [...new Set(kb.custom.map(c => c.category))] } }, null, 2) } ] }; }
- src/index.ts:36-48 (schema)Tool schema definition including name, description, and input schema for kb_initialize. Defines optional profileId parameter.name: 'kb_initialize', description: 'Initialize or check knowledge base status. Returns current profile summary and whether onboarding is needed.', inputSchema: { type: 'object', properties: { profileId: { type: 'string', description: 'Profile ID to use (default: "default")', default: 'default' } } } },