Skip to main content
Glama

create_project_v2

Create a new GitHub project V2 by specifying an owner ID, title, and optional description using the GraphQL API. Streamline GitHub project management and organization.

Instructions

Create a new GitHub project V2 using GraphQL API

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
descriptionNoDescription of the project
ownerIdYesThe node ID of the organization or user
titleYesTitle of the project

Implementation Reference

  • Core handler function that executes the GraphQL mutation to create a new GitHub Project V2.
    export async function createProjectV2(ownerId: string, title: string, description?: string) {
      try {
        const query = `
          mutation($input: CreateProjectV2Input!) {
            createProjectV2(input: $input) {
              projectV2 {
                id
                title
                shortDescription
                url
                closed
                createdAt
                updatedAt
                number
              }
            }
          }
        `;
    
        const variables = {
          input: {
            ownerId,
            title,
            description: description || ""
          }
        };
    
        const response = await graphqlRequest(query, variables);
    
        return response.data.createProjectV2.projectV2;
      } catch (error) {
        if (error instanceof GitHubError) {
          throw error;
        }
    
        throw new GitHubError(
          `Failed to create project v2: ${(error as Error).message}`,
          500,
          { error: (error as Error).message }
        );
      }
    }
  • Zod schema defining the input parameters for the create_project_v2 tool.
    export const CreateProjectV2Schema = z.object({
      ownerId: z.string().describe("The node ID of the organization or user"),
      title: z.string().describe("Title of the project"),
      description: z.string().optional().describe("Description of the project")
    });
  • index.ts:280-284 (registration)
    Tool registration in the list of tools provided by ListToolsRequestSchema.
    {
      name: "create_project_v2",
      description: "Create a new GitHub project V2 using GraphQL API",
      inputSchema: zodToJsonSchema(projectsV2.CreateProjectV2Schema),
    },
  • Dispatch handler in the main CallToolRequestSchema switch that invokes the specific createProjectV2 function.
    case "create_project_v2": {
      const args = projectsV2.CreateProjectV2Schema.parse(request.params.arguments);
      const result = await projectsV2.createProjectV2(
        args.ownerId,
        args.title,
        args.description
      );
      return {
        content: [{ type: "text", text: JSON.stringify(result, null, 2) }],
      };
    }
Behavior2/5

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

No annotations are provided, so the description carries full burden. It states this is a creation operation but doesn't disclose behavioral traits like required permissions, whether this creates public/private projects by default, rate limits, error conditions, or what happens on success. For a mutation tool with zero annotation coverage, this leaves significant gaps in understanding its behavior.

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 appropriately sized for a simple creation tool and front-loads the essential information (create, GitHub project V2, GraphQL API). Every word earns its place.

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?

For a mutation tool with no annotations and no output schema, the description is insufficient. It doesn't explain what the tool returns, what permissions are required, how it differs from 'create_project', or typical error conditions. Given the complexity of GitHub projects and the lack of structured behavioral information, the description should provide more context about this write operation.

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

Parameters3/5

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

Schema description coverage is 100%, so the schema already documents all three parameters (ownerId, title, description) with clear descriptions. The tool description adds no additional parameter information beyond what's in the schema. With complete schema coverage, the baseline is 3 even without parameter details in the description.

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 action ('Create') and resource ('new GitHub project V2'), and specifies the API method ('using GraphQL API'). It distinguishes from the sibling 'create_project' by specifying V2, but doesn't explain the functional difference between project versions. The purpose is clear but could better differentiate from its sibling.

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?

No guidance on when to use this tool versus alternatives like 'create_project' (the V1 version) or 'create_repository'. The description mentions 'V2' but doesn't explain when V2 projects are appropriate versus V1. There's no mention of prerequisites, permissions needed, or typical use cases.

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

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/tuanle96/mcp-github'

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