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

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

With no annotations provided, the description carries the full burden and effectively discloses key behavioral traits: it returns a user_id for future use, specifies rate limits (1000/hour for cloud vs. 100/hour for local), and hints at initialization effects. However, it lacks details on permissions, error handling, or long-term implications.

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

Conciseness5/5

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

The description is highly concise and front-loaded, with two sentences that efficiently cover purpose, return value, and rate limits without any wasted words. Every sentence adds critical information, making it easy to parse.

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 complexity (initialization with storage options) and no annotations or output schema, the description is moderately complete: it covers purpose, return value, and rate limits, but lacks details on error cases, authentication needs, or what the 'user_id' entails, leaving some gaps for an agent to infer.

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 already documents all parameters well. The description adds minimal value beyond the schema by mentioning 'cloud storage' and rate limits related to 'storage_type', but it does not explain parameter interactions or provide additional semantics for 'project_id' or 'project_name'.

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

Purpose5/5

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

The description clearly states the action ('Initialize a project-specific knowledge base with cloud storage') and the resource ('knowledge base'), distinguishing it from siblings like 'init_hive' or 'search_kb'. It specifies the outcome ('Returns user_id to store for future contributions'), making the purpose explicit and distinct.

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

Usage Guidelines4/5

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

The description provides clear context for when to use this tool (to set up a knowledge base with storage options) and implies usage by mentioning future contributions, but it does not explicitly state when not to use it or name alternatives among siblings like 'init_hive' or 'search_kb' for different scenarios.

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

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