Skip to main content
Glama

init_project_kb

Initialize a project-specific knowledge base with cloud or local storage to store debugging solutions and reusable skills as you work, enabling higher rate limits for cloud storage users.

Instructions

Initialize a project-specific knowledge base with cloud storage. Returns user_id to store for future contributions. Cloud storage users get 10x rate limits (1000/hour vs 100/hour).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
project_idYesUnique project identifier (e.g., 'hivemind-mcp', 'my-app')
project_nameYesHuman-readable project name
storage_typeNoStorage type: 'cloud' (10x limits) or 'local' (default limits)

Implementation Reference

  • The core handler function for the 'init_project_kb' tool. Makes a POST request to the backend API (/init-project) to initialize a project-specific knowledge base, handling cloud or local storage types.
    export async function initProjectKB( projectId: string, projectName: string, storageType: 'cloud' | 'local' = 'cloud' ): Promise<InitProjectResult> { const response = await fetch(`${API_BASE}/init-project`, { method: "POST", headers: { "Content-Type": "application/json", }, body: JSON.stringify({ project_id: projectId, project_name: projectName, storage_type: storageType }), }); if (!response.ok) { throw new Error(`Init project failed: ${response.statusText}`); } return response.json(); }
  • src/index.ts:124-147 (registration)
    Tool registration in ListToolsRequestHandler, defining the name, description, and input schema for 'init_project_kb'.
    { name: "init_project_kb", description: "Initialize a project-specific knowledge base with cloud storage. Returns user_id to store for future contributions. Cloud storage users get 10x rate limits (1000/hour vs 100/hour).", inputSchema: { type: "object", properties: { project_id: { type: "string", description: "Unique project identifier (e.g., 'hivemind-mcp', 'my-app')", }, project_name: { type: "string", description: "Human-readable project name", }, storage_type: { type: "string", enum: ["cloud", "local"], description: "Storage type: 'cloud' (10x limits) or 'local' (default limits)", }, }, required: ["project_id", "project_name"], }, },
  • MCP server handler dispatch in CallToolRequestHandler switch statement. Extracts arguments and calls the initProjectKB function, returning the result as text content.
    case "init_project_kb": { const result = await initProjectKB( args?.project_id as string, args?.project_name as string, args?.storage_type as 'cloud' | 'local' | undefined ); return { content: [{ type: "text", text: JSON.stringify(result, null, 2) }], }; }
  • Type definition for the return value of initProjectKB, defining the expected response structure from the backend API.
    interface InitProjectResult { success: boolean; user_id: string; project_id: string; project_name: string; storage_type: string; rate_limit: number; message: string; }

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/Kevthetech143/hivemind-mcp'

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