create_project
Initiate a new GitHub project by specifying title, owner, and visibility. Streamlines project setup and integrates with advanced workflows for efficient task and sprint management.
Instructions
Create a new GitHub project
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| owner | Yes | ||
| shortDescription | No | ||
| title | Yes | ||
| visibility | Yes |
Implementation Reference
- Main handler function that creates a new GitHub project by calling the GitHubProjectRepository.create method with validated input data.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 Zod input schema (createProjectSchema), description, and usage examples for the create_project tool.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-193 (registration)Registers the create_project tool in the central ToolRegistry singleton instance.this.registerTool(createProjectTool);
- src/index.ts:259-260 (handler)MCP server dispatch handler that routes create_project tool calls to ProjectManagementService.createProject.case "create_project": return await this.service.createProject(args);
- Zod validation schema for create_project tool input 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>;