Skip to main content
Glama

create_project

Create a new GitHub project with title, description, owner, and visibility settings to organize development work.

Instructions

Create a new GitHub project

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
titleYes
shortDescriptionNo
ownerYes
visibilityYes

Implementation Reference

  • Tool definition including name, description, input schema (createProjectSchema), and usage examples for the create_project MCP 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"
          }
        }
      ]
    };
  • Registration of the create_project tool in the central ToolRegistry singleton, making it available for list_tools responses.
    // Register project tools
    this.registerTool(createProjectTool);
    this.registerTool(listProjectsTool);
  • MCP tool dispatcher switch case that routes create_project calls to the ProjectManagementService.
    case "create_project":
      return await this.service.createProject(args);
  • Core tool handler method that validates input, constructs domain CreateProject object, and delegates to GitHubProjectRepository for execution.
    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);
      }
    }
  • Low-level repository implementation that executes the GitHub GraphQL createProjectV2 mutation (with follow-up update for description) and converts response to domain Project model.
    async create(data: CreateProject): Promise<Project> {
      // Step 1: Create project with valid CreateProjectV2Input schema
      const createMutation = `
        mutation($input: CreateProjectV2Input!) {
          createProjectV2(input: $input) {
            projectV2 {
              id
              title
              shortDescription
              closed
              createdAt
              updatedAt
            }
          }
        }
      `;
    
      // Build input according to official GitHub schema
      const createInput: any = {
        ownerId: this.owner,
        title: data.title,
      };
    
      // Add optional repositoryId if available
      if (this.repo) {
        createInput.repositoryId = this.repo;
      }
    
      const createResponse = await this.graphql<CreateProjectResponse>(createMutation, {
        input: createInput,
      });
    
      let project = createResponse.createProjectV2.projectV2;
    
      // Step 2: Update project with description if provided (shortDescription is not part of CreateProjectV2Input)
      if (data.shortDescription) {
        const updateMutation = `
          mutation($input: UpdateProjectV2Input!) {
            updateProjectV2(input: $input) {
              projectV2 {
                id
                title
                shortDescription
                closed
                createdAt
                updatedAt
              }
            }
          }
        `;
    
        const updateResponse = await this.graphql<UpdateProjectResponse>(updateMutation, {
          input: {
            projectId: project.id,
            shortDescription: data.shortDescription,
          },
        });
    
        project = updateResponse.updateProjectV2.projectV2;
      }
    
      return {
        id: project.id,
        type: ResourceType.PROJECT,
        title: project.title,
        description: project.shortDescription || "",
        owner: this.owner,
        number: parseInt(project.id.split('_').pop() || '0'),
        url: `https://github.com/orgs/${this.owner}/projects/${parseInt(project.id.split('_').pop() || '0')}`,
        status: project.closed ? ResourceStatus.CLOSED : ResourceStatus.ACTIVE,
        visibility: data.visibility || "private",
        views: data.views || [],
        fields: data.fields || [],
        createdAt: project.createdAt,
        updatedAt: project.updatedAt,
        closed: project.closed
      };
    }
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states 'Create a new GitHub project' which implies a write operation, but doesn't disclose any behavioral traits such as required permissions, rate limits, whether it's idempotent, what happens on duplicate titles, or what the response looks like. This is a significant gap for a mutation tool with zero annotation coverage.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence with zero wasted words. It's front-loaded with the core action and resource, making it immediately scannable and appropriately sized for its purpose.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given this is a mutation tool with 4 parameters (3 required), 0% schema description coverage, no annotations, and no output schema, the description is incomplete. It doesn't explain parameters, behavioral expectations, or return values, leaving significant gaps for an AI agent to understand and invoke the tool correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has 4 parameters with 0% description coverage, meaning none have descriptions in the schema. The tool description provides no information about parameters, not even mentioning what they are or their purposes (title, shortDescription, owner, visibility). This fails to compensate for the schema's lack of documentation.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb ('Create') and resource ('new GitHub project'), making the purpose immediately understandable. It distinguishes from siblings like 'update_project' or 'delete_project' by specifying creation. However, it doesn't explicitly differentiate from other creation tools like 'create_issue' or 'create_milestone' beyond the resource name.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites (e.g., authentication, repository context), when not to use it, or how it differs from similar creation tools like 'create_issue' or 'create_milestone' in the sibling list.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other 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/HarshKumarSharma/MCP'

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