create_project
Create a new GitHub project by specifying title, owner, and visibility settings to organize tasks and sprints.
Instructions
Create a new GitHub project
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| title | Yes | ||
| shortDescription | No | ||
| owner | Yes | ||
| visibility | Yes |
Implementation Reference
- Core handler function that executes the create_project tool logic by preparing CreateProject data and calling the GitHubProjectRepository.create method.async createProject(data: { title: string; shortDescription?: string; visibility?: 'private' | 'public'; }): Promise<Project> { try { const projectData: CreateProject = { title: data.title, shortDescription: data.shortDescription, owner: this.factory.getConfig().owner, visibility: data.visibility || 'private', }; return await this.projectRepo.create(projectData); } catch (error) { throw this.mapErrorToMCPError(error); } }
- Tool definition including name 'create_project', description, Zod input schema (createProjectSchema), and examples. This is used for MCP tool listing and validation.export const createProjectTool: ToolDefinition<CreateProjectArgs> = { name: "create_project", description: "Create a new GitHub project", schema: createProjectSchema as unknown as ToolSchema<CreateProjectArgs>, examples: [ { name: "Create private project", description: "Create a new private GitHub project", args: { title: "Backend API Development", shortDescription: "Project for tracking backend API development tasks", owner: "example-owner", visibility: "private" } } ] };
- src/infrastructure/tools/ToolRegistry.ts:193-194 (registration)Registration of the create_project tool in the central ToolRegistry during server initialization.this.registerTool(createProjectTool); this.registerTool(listProjectsTool);
- Zod input validation schema for create_project tool parameters.export const createProjectSchema = z.object({ title: z.string().min(1, "Project title is required"), shortDescription: z.string().optional(), owner: z.string().min(1, "Project owner is required"), visibility: z.enum(["private", "public"]).default("private"), }); export type CreateProjectArgs = z.infer<typeof createProjectSchema>;
- src/index.ts:259-260 (handler)Tool dispatch handler in executeToolHandler switch statement that routes create_project calls to ProjectManagementService.createProject.case "create_project": return await this.service.createProject(args);