Skip to main content
Glama

kb_initialize

Initialize or check knowledge base status to determine if onboarding is needed and retrieve current profile summary for persistent AI memory.

Instructions

Initialize or check knowledge base status. Returns current profile summary and whether onboarding is needed.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
profileIdNoProfile ID to use (default: "default")default

Implementation Reference

  • Schema definition for the kb_initialize tool, including name, description, and input schema.
    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' } } } },
  • Handler implementation for kb_initialize tool. Checks if the knowledge base is new using KnowledgeManager and returns initialization status with profile summary.
    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:423-425 (registration)
    Registration of all tool schemas via the ListToolsRequestSchema handler, which returns the tools array containing kb_initialize schema.
    server.setRequestHandler(ListToolsRequestSchema, async () => { return { tools }; });

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/hlsitechio/mcp-instruct'

If you have feedback or need assistance with the MCP directory API, please join our Discord server