create_project_view
Create a new view for GitHub projects to organize tasks as boards, tables, timelines, or roadmaps for better project management and visibility.
Instructions
Create a new view for a GitHub project
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| projectId | Yes | ||
| name | Yes | ||
| layout | Yes |
Input Schema (JSON Schema)
{
"properties": {
"layout": {
"enum": [
"board",
"table",
"timeline",
"roadmap"
]
},
"name": {
"type": "string"
},
"projectId": {
"type": "string"
}
},
"required": [
"projectId",
"name",
"layout"
],
"type": "object"
}
Implementation Reference
- Main handler method that executes the create_project_view tool by delegating to the GitHubProjectRepository.createView method.async createProjectView(data: { projectId: string; name: string; layout: 'board' | 'table' | 'timeline' | 'roadmap'; }): Promise<ProjectView> { try { return await this.projectRepo.createView( data.projectId, data.name, data.layout ); } catch (error) { throw this.mapErrorToMCPError(error); } }
- Zod schema definition for validating input arguments to the create_project_view tool, including projectId, name, and layout.// Schema for create_project_view tool export const createProjectViewSchema = z.object({ projectId: z.string().min(1, "Project ID is required"), name: z.string().min(1, "View name is required"), layout: z.enum(["board", "table", "timeline", "roadmap"]), }); export type CreateProjectViewArgs = z.infer<typeof createProjectViewSchema>;
- src/infrastructure/tools/ToolRegistry.ts:174-176 (registration)Registration of the create_project_view tool in the central ToolRegistry during initialization of built-in tools.this.registerTool(createProjectViewTool); this.registerTool(listProjectViewsTool); this.registerTool(updateProjectViewTool);
- ToolDefinition export that includes the schema, description, name, and examples for the create_project_view tool.export const createProjectViewTool: ToolDefinition<CreateProjectViewArgs> = { name: "create_project_view", description: "Create a new view for a GitHub project", schema: createProjectViewSchema as unknown as ToolSchema<CreateProjectViewArgs>, examples: [ { name: "Create kanban board view", description: "Create a board view for a project", args: { projectId: "PVT_kwDOLhQ7gc4AOEbH", name: "Development Board", layout: "board" } } ] };
- src/index.ts:323-324 (handler)Dispatch handler in the main server that routes create_project_view calls to the ProjectManagementService.createProjectView method.case "create_project_view": return await this.service.createProjectView(args);