Skip to main content
Glama
Mulan Permissive Software License, Version 2
15
7

create_pull_request

Generate a pull request in a repository to propose and review code changes. Specify title, description, source branch, and target branch to facilitate collaboration on AtomGit MCP Server.

Instructions

Create a new pull request in a repository

Input Schema

NameRequiredDescriptionDefault
bodyYes
ownerYes
repoYes

Input Schema (JSON Schema)

{ "$schema": "http://json-schema.org/draft-07/schema#", "additionalProperties": false, "properties": { "body": { "additionalProperties": false, "properties": { "base": { "type": "string" }, "body": { "type": "string" }, "draft": { "default": false, "type": "boolean" }, "head": { "type": "string" }, "title": { "type": "string" } }, "required": [ "title", "body", "head", "base" ], "type": "object" }, "owner": { "type": "string" }, "repo": { "type": "string" } }, "required": [ "owner", "repo", "body" ], "type": "object" }

Implementation Reference

  • Core handler function that performs the HTTP POST request to create a pull request on AtomGit API.
    export async function createPullRequest( owner: string, repo: string, body: { title: string; body: string; head: string; base: string; draft: boolean } ) { return atomGitRequest( `https://api.atomgit.com/repos/${encodeURIComponent(owner)}/${encodeURIComponent(repo)}/pulls`, { method: "POST", body, } ); }
  • MCP server tool call handler that parses input arguments, calls the createPullRequest implementation, and formats the response.
    case "create_pull_request": { const args = pull.CreatePullRequestSchema.parse(request.params.arguments); const result = await pull.createPullRequest(args.owner, args.repo, args.body); return { content: [{ type: "text", text: JSON.stringify(result, null, 2) }], }; }
  • Zod schema defining the input parameters for the create_pull_request tool, used for validation.
    export const CreatePullRequestSchema = z.object({ owner: z.string(), repo: z.string(), body: z.object({ title: z.string(), // Pull request title body: z.string(), // Pull request description head: z.string(), // Source branch base: z.string(), // Target branch draft: z.boolean().default(false), // Draft status }), });
  • index.ts:133-136 (registration)
    Tool registration in the MCP server's listTools response, specifying name, description, and input schema.
    name: "create_pull_request", description: "Create a new pull request in a repository", inputSchema: zodToJsonSchema(pull.CreatePullRequestSchema), },

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/kaiyuanxiaobing/atomgit-mcp-server'

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