Skip to main content
Glama

create_project

Initiate a new project by defining an initial prompt and organizing tasks. Streamline workflows by setting task details, tool recommendations, and optional auto-approval settings for efficient task management.

Instructions

Create a new project with an initial prompt and a list of tasks. This is typically the first step in any workflow.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
autoApproveNoIf true, tasks will be automatically approved when marked as done. If false or not provided, tasks require manual approval.
initialPromptYesThe initial prompt or goal for the project.
projectPlanNoA more detailed plan for the project. If not provided, the initial prompt will be used.
tasksYesAn array of task objects.

Implementation Reference

  • MCP tool handler/executor: validates inputs (initialPrompt, tasks, projectPlan, autoApprove) and calls TaskManager.createProject to create the project.
    const createProjectToolExecutor: ToolExecutor = { name: "create_project", async execute(taskManager, args) { const initialPrompt = validateRequiredStringParam(args.initialPrompt, "initialPrompt"); const validatedTasks = validateTaskObjects(args.tasks); const projectPlan = args.projectPlan !== undefined ? String(args.projectPlan) : undefined; const autoApprove = args.autoApprove as boolean | undefined; if (args.projectPlan !== undefined && typeof args.projectPlan !== 'string') { throw new AppError( "Invalid type for optional parameter 'projectPlan' (Expected string)", AppErrorCode.InvalidArgument ); } if (args.autoApprove !== undefined && typeof args.autoApprove !== 'boolean') { throw new AppError( "Invalid type for optional parameter 'autoApprove' (Expected boolean)", AppErrorCode.InvalidArgument ); } const resultData = await taskManager.createProject( initialPrompt, validatedTasks, projectPlan, autoApprove ); return resultData; }, };
  • Tool definition with name, description, and detailed input schema for create_project.
    const createProjectTool: Tool = { name: "create_project", description: "Create a new project with an initial prompt and a list of tasks. This is typically the first step in any workflow.", inputSchema: { type: "object", properties: { initialPrompt: { type: "string", description: "The initial prompt or goal for the project.", }, projectPlan: { type: "string", description: "A more detailed plan for the project. If not provided, the initial prompt will be used.", }, tasks: { type: "array", description: "An array of task objects.", items: { type: "object", properties: { title: { type: "string", description: "The title of the task.", }, description: { type: "string", description: "A detailed description of the task.", }, toolRecommendations: { type: "string", description: "Recommendations for tools to use to complete the task.", }, ruleRecommendations: { type: "string", description: "Recommendations for relevant rules to review when completing the task.", }, }, required: ["title", "description"], }, }, autoApprove: { type: "boolean", description: "If true, tasks will be automatically approved when marked as done. If false or not provided, tasks require manual approval.", }, }, required: ["initialPrompt", "tasks"], }, };
  • Core logic: generates project/task IDs, initializes project data structure, persists to JSON file, returns success data.
    public async createProject( initialPrompt: string, tasks: { title: string; description: string; toolRecommendations?: string; ruleRecommendations?: string }[], projectPlan?: string, autoApprove?: boolean ): Promise<ProjectCreationSuccessData> { await this.ensureInitialized(); await this.reloadFromDisk(); this.projectCounter += 1; const projectId = `proj-${this.projectCounter}`; const newTasks: Task[] = []; for (const taskDef of tasks) { this.taskCounter += 1; newTasks.push({ id: `task-${this.taskCounter}`, title: taskDef.title, description: taskDef.description, status: "not started", approved: false, completedDetails: "", toolRecommendations: taskDef.toolRecommendations, ruleRecommendations: taskDef.ruleRecommendations, }); } const newProject: Project = { projectId, initialPrompt, projectPlan: projectPlan || initialPrompt, tasks: newTasks, completed: false, autoApprove: autoApprove === false ? false : true, }; this.data.projects.push(newProject); await this.saveTasks(); return { projectId, totalTasks: newTasks.length, tasks: newTasks.map((t) => ({ id: t.id, title: t.title, description: t.description, })), message: `Project ${projectId} created with ${newTasks.length} tasks.`, }; }
  • Registers the create_project executor in the global toolExecutorMap used by executeToolAndHandleErrors.
    toolExecutorMap.set(createProjectToolExecutor.name, createProjectToolExecutor);
  • Includes createProjectTool in the exported ALL_TOOLS array, used for MCP tools/listing.
    export const ALL_TOOLS: Tool[] = [ listProjectsTool, readProjectTool, createProjectTool, deleteProjectTool, addTasksToProjectTool, finalizeProjectTool, generateProjectPlanTool, listTasksTool, readTaskTool, createTaskTool, updateTaskTool, deleteTaskTool, approveTaskTool, getNextTaskTool, ];

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/chriscarrollsmith/taskqueue-mcp'

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