Skip to main content
Glama

create_pull_request

Create a new pull request in an AtomGit repository to propose code changes for review and merging into the main branch.

Instructions

Create a new pull request in a repository

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
ownerYes
repoYes
bodyYes

Implementation Reference

  • Core handler function that executes the logic to create a pull request by making a POST request to the 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, } ); }
  • Zod schema defining the input structure for the create_pull_request tool.
    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:132-136 (registration)
    Tool registration in the list of available tools, including name, description, and input schema reference.
    { name: "create_pull_request", description: "Create a new pull request in a repository", inputSchema: zodToJsonSchema(pull.CreatePullRequestSchema), },
  • Dispatcher handler in the CallToolRequest switch statement that validates input and invokes the core createPullRequest function.
    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) }], }; }

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