Skip to main content
Glama

create_project

Initiate new projects with structured organization, Git-trackable data, and comprehensive documentation to enhance collaboration and task management in your development workflow.

Instructions

Launch new projects with structured organization and detailed documentation. Establishes a solid foundation for task management with Git-trackable project data, enabling seamless collaboration and progress tracking across your development workflow.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
descriptionYesA detailed description of the project
nameYesThe name of the new project
workingDirectoryYesThe full absolute path to the working directory where data is stored. MUST be an absolute path, never relative. Windows: "C:\Users\username\project" or "D:\projects\my-app". Unix/Linux/macOS: "/home/username/project" or "/Users/username/project". Do NOT use: ".", "..", "~", "./folder", "../folder" or any relative paths. Ensure the path exists and is accessible before calling this tool. NOTE: When server is started with --claude flag, this parameter is ignored and a global user directory is used instead.

Implementation Reference

  • The main handler function that executes the create_project tool logic: validates inputs, checks for unique name, creates Project object with UUID, calls storage.createProject, and returns success/error response.
    handler: async ({ name, description }: { name: string; description: string }) => { try { // Validate inputs if (!name || name.trim().length === 0) { return { content: [{ type: 'text' as const, text: 'Error: Project name is required.' }], isError: true }; } if (name.trim().length > 100) { return { content: [{ type: 'text' as const, text: 'Error: Project name must be 100 characters or less.' }], isError: true }; } if (!description || description.trim().length === 0) { return { content: [{ type: 'text' as const, text: 'Error: Project description is required.' }], isError: true }; } if (description.trim().length > 1000) { return { content: [{ type: 'text' as const, text: 'Error: Project description must be 1000 characters or less.' }], isError: true }; } // Validate that project name is unique const existingProjects = await storage.getProjects(); const nameExists = existingProjects.some(p => p.name.toLowerCase() === name.trim().toLowerCase()); if (nameExists) { return { content: [{ type: 'text' as const, text: `Error: A project with the name "${name.trim()}" already exists. Please choose a different name.` }], isError: true }; } const now = new Date().toISOString(); const project: Project = { id: randomUUID(), name: name.trim(), description: description.trim(), createdAt: now, updatedAt: now }; const createdProject = await storage.createProject(project); return { content: [{ type: 'text' as const, text: `✅ Project created successfully! **${createdProject.name}** (ID: ${createdProject.id}) Description: ${createdProject.description} Created: ${new Date(createdProject.createdAt).toLocaleString()} You can now add tasks to this project using the create_task tool.` }] }; } catch (error) { return { content: [{ type: 'text' as const, text: `Error creating project: ${error instanceof Error ? error.message : 'Unknown error'}` }], isError: true }; } }
  • src/server.ts:99-122 (registration)
    MCP server registration of the 'create_project' tool using server.tool(), including description, Zod input schema, and wrapper handler that creates storage and delegates to the tool handler from createCreateProjectTool.
    server.tool( 'create_project', 'Launch new projects with structured organization and detailed documentation. Establishes a solid foundation for task management with Git-trackable project data, enabling seamless collaboration and progress tracking across your development workflow.', { workingDirectory: z.string().describe(getWorkingDirectoryDescription(config)), name: z.string().describe('The name of the new project'), description: z.string().describe('A detailed description of the project') }, async ({ workingDirectory, name, description }: { workingDirectory: string; name: string; description: string }) => { try { const storage = await createStorage(workingDirectory, config); const tool = createCreateProjectTool(storage); return await tool.handler({ name, description }); } catch (error) { return { content: [{ type: 'text' as const, text: `Error: ${error instanceof Error ? error.message : 'Unknown error'}` }], isError: true }; } } );
  • Zod input schema for the create_project tool registered in MCP server, defining parameters: workingDirectory, name, description.
    { workingDirectory: z.string().describe(getWorkingDirectoryDescription(config)), name: z.string().describe('The name of the new project'), description: z.string().describe('A detailed description of the project') },
  • Implementation of storage.createProject in FileStorage class: appends project to data.projects array, saves to JSON file, returns the project.
    async createProject(project: Project): Promise<Project> { this.data.projects.push(project); await this.save(); return project; }
  • TypeScript interface defining input for creating a project, matching the tool parameters.
    export interface CreateProjectInput { /** Project name */ name: string; /** Project description/overview */ description: 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/Pimzino/agentic-tools-mcp'

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