Skip to main content
Glama
aaronfeingold

MCP Project Context Server

Create Project

create_project

Initialize a new project with name, description, tech stack details, and current phase to establish persistent context for coding sessions.

Instructions

Create a new project with initial context

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesProject name
descriptionYesProject description
techStackNo
currentPhaseYesCurrent project phase

Implementation Reference

  • The asynchronous handler function for the 'create_project' MCP tool, which processes input, creates the project via store, and returns formatted response or error.
    async ({ name, description, techStack, currentPhase }) => {
      try {
        const project = await this.store.createProject({
          name,
          description,
          status: "planning",
          techStack: techStack || {
            frontend: [],
            backend: [],
            database: [],
            infrastructure: [],
            tools: [],
          },
          architecture: {
            observability: [],
          },
          currentPhase,
          nextSteps: [],
          tasks: [],
          decisions: [],
          notes: [],
        });
        return {
          content: [
            {
              type: "text",
              text: `Project "${project.name}" created with ID: ${project.id}`,
            },
          ],
        };
      } catch (error) {
        return {
          content: [
            {
              type: "text",
              text: `Error creating project: ${
                error instanceof Error ? error.message : "Unknown error"
              }`,
            },
          ],
        };
      }
    }
  • Zod input schema for validating parameters of the create_project tool.
    inputSchema: {
      name: z.string().describe("Project name"),
      description: z.string().describe("Project description"),
      techStack: z
        .object({
          frontend: z.array(z.string()).default([]),
          backend: z.array(z.string()).default([]),
          database: z.array(z.string()).default([]),
          infrastructure: z.array(z.string()).default([]),
          tools: z.array(z.string()).default([]),
        })
        .optional(),
      currentPhase: z.string().describe("Current project phase"),
    },
  • src/server.ts:25-88 (registration)
    MCP server registration of the 'create_project' tool, specifying name, metadata, schema, and handler callback.
    this.server.registerTool(
      "create_project",
      {
        title: "Create Project",
        description: "Create a new project with initial context",
        inputSchema: {
          name: z.string().describe("Project name"),
          description: z.string().describe("Project description"),
          techStack: z
            .object({
              frontend: z.array(z.string()).default([]),
              backend: z.array(z.string()).default([]),
              database: z.array(z.string()).default([]),
              infrastructure: z.array(z.string()).default([]),
              tools: z.array(z.string()).default([]),
            })
            .optional(),
          currentPhase: z.string().describe("Current project phase"),
        },
      },
      async ({ name, description, techStack, currentPhase }) => {
        try {
          const project = await this.store.createProject({
            name,
            description,
            status: "planning",
            techStack: techStack || {
              frontend: [],
              backend: [],
              database: [],
              infrastructure: [],
              tools: [],
            },
            architecture: {
              observability: [],
            },
            currentPhase,
            nextSteps: [],
            tasks: [],
            decisions: [],
            notes: [],
          });
          return {
            content: [
              {
                type: "text",
                text: `Project "${project.name}" created with ID: ${project.id}`,
              },
            ],
          };
        } catch (error) {
          return {
            content: [
              {
                type: "text",
                text: `Error creating project: ${
                  error instanceof Error ? error.message : "Unknown error"
                }`,
              },
            ],
          };
        }
      }
    );
  • ProjectStore.createProject helper method that generates ID, timestamps, validates with schema, and persists project as JSON file.
    async createProject(
      projectData: Omit<
        ProjectContext,
        "id" | "createdAt" | "updatedAt" | "lastAccessedAt"
      >
    ): Promise<ProjectContext> {
      const now = new Date().toISOString();
      const project: ProjectContext = {
        ...projectData,
        id: uuidv4(),
        createdAt: now,
        updatedAt: now,
        lastAccessedAt: now,
      };
    
      const validated = ProjectContextSchema.parse(project);
      const filePath = path.join(this.projectsDir, `${project.id}.json`);
      await fs.writeJson(filePath, validated, { spaces: 2 });
    
      return validated;
    }
  • Comprehensive Zod schema for ProjectContext type, used to validate project data in the store.
    export const ProjectContextSchema = z.object({
      id: z.string(),
      name: z.string(),
      description: z.string(),
      status: ProjectStatusSchema,
      techStack: z.object({
        frontend: z.array(z.string()).default([]),
        backend: z.array(z.string()).default([]),
        database: z.array(z.string()).default([]),
        infrastructure: z.array(z.string()).default([]),
        tools: z.array(z.string()).default([]),
      }),
      architecture: z.object({
        pattern: z.string().optional(),
        deploymentTarget: z.string().optional(),
        scalingStrategy: z.string().optional(),
        observability: z.array(z.string()).default([]),
      }),
      currentPhase: z.string(),
      nextSteps: z.array(z.string()).default([]),
      tasks: z.array(TaskSchema).default([]),
      decisions: z
        .array(
          z.object({
            id: z.string(),
            decision: z.string(),
            reasoning: z.string(),
            timestamp: z.string(),
            impact: z.string().optional(),
          })
        )
        .default([]),
      notes: z
        .array(
          z.object({
            id: z.string(),
            content: z.string(),
            timestamp: z.string(),
            category: z.string().optional(),
          })
        )
        .default([]),
      createdAt: z.string(),
      updatedAt: z.string(),
      lastAccessedAt: z.string(),
    });
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. While 'Create' implies a write operation, the description doesn't address permissions required, whether the operation is idempotent, what happens on duplicate names, or what the response contains. For a mutation tool with zero annotation coverage, this leaves significant behavioral questions unanswered.

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 perfectly concise at 6 words, front-loading the essential action. Every word earns its place: 'Create' (verb), 'new project' (resource), 'with initial context' (scope). There's no wasted language or unnecessary elaboration.

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 4 parameters (including a complex nested object), no annotations, and no output schema, the description is insufficient. It doesn't explain what 'initial context' means, what happens after creation, or provide any behavioral context. The agent would need to guess about the tool's full behavior and output.

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?

With 75% schema description coverage, the schema already documents most parameters well. The description adds minimal value beyond what's in the schema - 'initial context' vaguely relates to parameters but doesn't explain how 'techStack' or 'currentPhase' contribute to that context. The baseline of 3 is appropriate given the schema does substantial documentation work.

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 verb ('Create') and resource ('new project'), making the purpose immediately understandable. It distinguishes from siblings like 'list_projects' or 'get_project_context' by specifying creation rather than retrieval. However, it doesn't explicitly differentiate from potential similar creation tools that might exist in other contexts.

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. There's no mention of prerequisites, when this should be used instead of other project-related tools, or what constitutes 'initial context' that would trigger its use. The agent must infer usage from the tool name alone.

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/aaronfeingold/mcp-project-context'

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