Skip to main content
Glama
kunwarVivek

mcp-github-project-manager

create_pull_request

Create a new pull request in a GitHub repository to propose and review code changes before merging into the main branch.

Instructions

Create a new pull request in a GitHub repository

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
titleYes
bodyNo
headYes
baseYes
draftNo

Implementation Reference

  • The core handler function that creates a pull request using GitHub's Octokit REST API. This is the exact implementation of the tool logic.
    async createPullRequest(data: {
      title: string;
      body?: string;
      head: string;
      base: string;
      draft?: boolean;
    }): Promise<{ number: number; id: number; title: string; state: string; url: string }> {
      try {
        const octokit = this.factory.getOctokit();
        const config = this.factory.getConfig();
    
        const response = await octokit.rest.pulls.create({
          owner: config.owner,
          repo: config.repo,
          title: data.title,
          body: data.body || '',
          head: data.head,
          base: data.base,
          draft: data.draft || false
        });
    
        return {
          number: response.data.number,
          id: response.data.id,
          title: response.data.title,
          state: response.data.state,
          url: response.data.html_url
        };
      } catch (error) {
        throw this.mapErrorToMCPError(error);
      }
    }
  • ToolDefinition object defining the tool name, description, input schema (createPullRequestSchema), and examples.
    export const createPullRequestTool: ToolDefinition<CreatePullRequestArgs> = {
      name: "create_pull_request",
      description: "Create a new pull request in a GitHub repository",
      schema: createPullRequestSchema as unknown as ToolSchema<CreatePullRequestArgs>,
      examples: [
        {
          name: "Create feature PR",
          description: "Create a pull request for a new feature",
          args: {
            title: "Add user authentication",
            body: "Implements OAuth 2.0 authentication with Auth0",
            head: "feature/auth",
            base: "main"
          }
        }
      ]
    };
  • Registration of the createPullRequestTool in the central ToolRegistry singleton.
    this.registerTool(createPullRequestTool);
  • Dispatch handler in main MCP server that routes tool calls to ProjectManagementService.createPullRequest.
    case "create_pull_request":
      return await this.service.createPullRequest(args);
Behavior2/5

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

With no annotations provided, the description carries full burden for behavioral disclosure. It states this is a creation operation but doesn't mention authentication requirements, rate limits, whether it's idempotent, what happens on success/failure, or the response format. This is inadequate 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 that directly states the tool's purpose without unnecessary words. It's appropriately sized for a basic tool description and front-loads the essential information.

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 5 parameters (3 required), 0% schema description coverage, no annotations, and no output schema, the description is severely incomplete. It doesn't explain parameter meanings, behavioral aspects, or what the tool returns, leaving significant gaps for an AI agent to use it 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?

Schema description coverage is 0%, meaning none of the 5 parameters have schema descriptions. The tool description provides no information about what 'title', 'body', 'head', 'base', or 'draft' mean, their expected formats, or how they relate to GitHub pull request creation. This leaves critical parameter semantics undocumented.

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 pull request in a GitHub repository'), making the purpose immediately understandable. However, it doesn't differentiate this tool from its sibling 'update_pull_request' or explain how it differs from 'create_pull_request_review' in the same server.

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 like 'update_pull_request' or 'create_pull_request_review'. It also doesn't mention prerequisites (e.g., needing repository access) or when not to use it (e.g., for existing pull requests).

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/kunwarVivek/mcp-github-project-manager'

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