Skip to main content
Glama
yywdandan

Memory Bank MCP Server

by yywdandan

create_project

Initiate and manage new projects on the Memory Bank MCP Server by defining project names and descriptions, enabling organized multi-project Markdown document handling and LLM tool integration.

Instructions

创建新项目

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
descriptionNo项目描述
nameYes项目名称

Implementation Reference

  • Core handler function implementing the create_project tool logic. Validates input, creates project via storage, initializes default documents from config templates, and returns project details.
    export const createProject = async (name: string, description: string) => {
      try {
        if (!name) throw new Error('项目名称不能为空');
        
        const project = await projectStorage.create(name, description);
        
        // 为新项目创建默认文档
        const defaultDocs = [];
        for (const [type, template] of Object.entries(config.defaultDocumentTemplates)) {
          const docName = Document.getFileName(type);
          const doc = await documentStorage.create(
            project.id, 
            docName,
            template,
            type
          );
          defaultDocs.push(doc);
        }
        
        return {
          id: project.id,
          name: project.name,
          description: project.description,
          createdAt: project.createdAt,
          updatedAt: project.updatedAt,
          documents: defaultDocs.map(d => d.name)
        };
      } catch (error) {
        console.error('创建项目错误:', error);
        throw new Error('创建项目失败');
      }
    };
  • Tool registration in MCP server's listTools response, including name, description, and input schema definition.
      name: 'create_project',
      description: '创建新项目',
      inputSchema: {
        type: 'object',
        properties: {
          name: {
            type: 'string',
            description: '项目名称',
          },
          description: {
            type: 'string',
            description: '项目描述',
          },
        },
        required: ['name'],
      },
    },
  • Server-side dispatch handler for create_project tool calls, validates arguments and invokes the tools.createProject function.
    case 'create_project': {
      if (!args.name) {
        throw new McpError(ErrorCode.InvalidParams, '项目名称不能为空');
      }
      return this.formatResponse(await tools.createProject(
        args.name as string, 
        (args.description as string) || ''
      ));
    }
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. '创建新项目' implies a write operation but doesn't specify permissions needed, whether the operation is idempotent, what happens on failure, or what the response contains. This is inadequate for a mutation tool with zero annotation coverage.

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 extremely concise with just three characters in Chinese ('创建新项目'), which translates to 'Create new project'. It's front-loaded and wastes no words, making it efficient for quick comprehension.

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

Completeness2/5

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

For a creation tool with no annotations and no output schema, the description is insufficient. It doesn't explain what a 'project' entails in this context, what happens after creation, or any side effects. Given the complexity of project management implied by sibling tools, more context is needed for effective use.

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?

The description adds no parameter information beyond what's already in the schema, which has 100% coverage with clear descriptions for both 'name' and 'description'. Since the schema does the heavy lifting, the baseline score of 3 is appropriate, though the description doesn't enhance understanding of parameter usage or constraints.

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 '创建新项目' (Create new project) clearly states the verb ('create') and resource ('project'), making the purpose immediately understandable. However, it doesn't distinguish this tool from similar siblings like 'update_project' or 'delete_project', which would require more specific differentiation.

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. With siblings like 'update_project', 'delete_project', and 'list_projects' available, there's no indication of prerequisites, appropriate contexts, or when other tools might be more suitable.

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

Related 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/yywdandan/memory-bank-mcp-server'

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