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) }],
      };
    }
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It states the action ('create') but doesn't describe what this entails—whether it requires specific permissions, what happens on success/failure, if it's idempotent, or any rate limits. For a mutation tool with zero annotation coverage, this is a significant gap in transparency.

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 gets straight to the point with no wasted words. It's appropriately sized for a basic tool definition and front-loads the core action and resource, making it easy to parse quickly.

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 the complexity (3 parameters with nested objects, no output schema, and no annotations), the description is incomplete. It doesn't cover parameter meanings, behavioral traits, or usage context, leaving the agent with insufficient information to reliably invoke this tool. For a creation tool with multiple parameters, more guidance is needed.

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?

The schema description coverage is 0%, meaning none of the parameters are documented in the schema. The description adds no information about parameters beyond implying a repository context. It doesn't explain what 'owner', 'repo', or the nested 'body' object fields mean, leaving the agent to guess parameter semantics from the schema structure alone.

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 repository'), making the purpose immediately understandable. It distinguishes this tool from siblings like create_issue or create_pull_request_comment by specifying the pull request resource. However, it doesn't explicitly differentiate from all siblings (e.g., create_pull_request_reply), so it's not a perfect 5.

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. It doesn't mention prerequisites (e.g., needing a repository, branch permissions), when not to use it, or how it differs from similar tools like create_issue. This leaves the agent with insufficient context for optimal tool selection.

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

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