Skip to main content
Glama

update_project_v2

Modify GitHub project V2 details using GraphQL API, including title, description, and project status, by providing the project ID and desired updates.

Instructions

Update a GitHub project V2 using GraphQL API

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
closedNoWhether to close the project
descriptionNoNew description for the project
projectIdYesThe node ID of the project
titleNoNew title for the project

Implementation Reference

  • Core handler function that executes the GraphQL mutation to update a GitHub Project V2.
    export async function updateProjectV2(projectId: string, title?: string, description?: string, closed?: boolean) {
      try {
        const query = `
          mutation($input: UpdateProjectV2Input!) {
            updateProjectV2(input: $input) {
              projectV2 {
                id
                title
                shortDescription
                url
                closed
                createdAt
                updatedAt
                number
              }
            }
          }
        `;
    
        const input: Record<string, any> = { projectId };
    
        if (title !== undefined) {
          input.title = title;
        }
    
        if (description !== undefined) {
          input.shortDescription = description;
        }
    
        if (closed !== undefined) {
          input.closed = closed;
        }
    
        const variables = { input };
        const response = await graphqlRequest(query, variables);
    
        return response.data.updateProjectV2.projectV2;
      } catch (error) {
        if (error instanceof GitHubError) {
          throw error;
        }
    
        throw new GitHubError(
          `Failed to update project v2: ${(error as Error).message}`,
          500,
          { error: (error as Error).message }
        );
      }
    }
  • Zod input schema for validating tool arguments.
    export const UpdateProjectV2Schema = z.object({
      projectId: z.string().describe("The node ID of the project"),
      title: z.string().optional().describe("New title for the project"),
      description: z.string().optional().describe("New description for the project"),
      closed: z.boolean().optional().describe("Whether to close the project")
    });
  • index.ts:285-289 (registration)
    Tool registration in the ListTools response.
    {
      name: "update_project_v2",
      description: "Update a GitHub project V2 using GraphQL API",
      inputSchema: zodToJsonSchema(projectsV2.UpdateProjectV2Schema),
    },
  • Dispatch handler case that parses arguments and invokes the core updateProjectV2 function.
    case "update_project_v2": {
      const args = projectsV2.UpdateProjectV2Schema.parse(request.params.arguments);
      const result = await projectsV2.updateProjectV2(
        args.projectId,
        args.title,
        args.description,
        args.closed
      );
      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 mentions 'Update' implying mutation but doesn't disclose behavioral traits like required permissions, whether changes are reversible, rate limits, or what happens to unspecified fields. For a mutation tool with zero annotation coverage, this is a significant gap.

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 waste. It's front-loaded with the core purpose and includes the API method, making it appropriately sized and structured.

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 no annotations, no output schema, and a mutation tool with 4 parameters, the description is incomplete. It lacks behavioral context, usage guidelines, and details on return values or errors. For a tool that modifies GitHub projects, this leaves significant gaps for an AI agent.

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 parameters (projectId, title, description, closed). The description adds no additional meaning beyond what the schema provides, such as format details or constraints. Baseline 3 is appropriate when schema does the heavy lifting.

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 ('Update') and resource ('a GitHub project V2'), and specifies the API method ('using GraphQL API'). It distinguishes from siblings like 'update_project' (likely V1) and 'update_project_v2_item_field' (field-specific). However, it doesn't explicitly contrast with all siblings, missing some nuance.

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 'update_project' (likely V1) or 'update_project_v2_item_field'. The description lacks context about prerequisites, such as needing an existing project ID, or when not to use it (e.g., for creating projects).

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