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 };
    });
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It mentions the tool 'Returns current profile summary and whether onboarding is needed', which gives some output context, but lacks details on side effects (e.g., does initialization create resources?), permissions, error handling, or rate limits. For a tool with 'initialize' in its name and no annotations, this is inadequate.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that front-loads the core purpose ('Initialize or check knowledge base status') and adds key output details. Every word earns its place, though it could be slightly more structured (e.g., separating initialization from checking).

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's moderate complexity (initialization/status check with one parameter), no annotations, and no output schema, the description is minimally adequate. It covers the purpose and output but lacks behavioral context and usage guidelines. With no output schema, it should ideally describe the return format more explicitly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema fully documents the single parameter 'profileId'. The description adds no parameter-specific information beyond what's in the schema, but with high coverage and only one parameter, the baseline score of 3 is appropriate as the schema does the heavy lifting.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose with specific verbs ('Initialize or check') and resource ('knowledge base status'), distinguishing it from siblings like 'kb_onboard' or 'kb_quick_setup'. However, it doesn't explicitly differentiate from 'kb_get_all' or 'kb_get_context', which might also provide status information.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives like 'kb_onboard' (for onboarding), 'kb_quick_setup', or other 'kb_get_*' tools. It mentions 'whether onboarding is needed' but doesn't clarify if this is the primary use case or how it relates to sibling tools.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other 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