Skip to main content
Glama
nikydobrev

Azure DevOps Multi-Organization MCP Server

by nikydobrev

git_create_pull_request

Create a new pull request in an Azure DevOps repository to merge code changes from a source branch to a target branch, facilitating code review and collaboration.

Instructions

Creates a new pull request in a repository

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
organizationYesThe name of the Azure DevOps organization
projectYesProject ID or name
repositoryIdYesThe repository ID or name
sourceRefNameYesSource branch name (e.g. refs/heads/feature/my-feature)
targetRefNameYesTarget branch name (e.g. refs/heads/main)
titleYesTitle of the pull request
descriptionNoDescription of the pull request
isDraftNoCreate as a draft PR

Implementation Reference

  • The handler function that creates a pull request by calling the Azure DevOps Git API's createPullRequest method and returns the created PR as JSON.
    async ({ organization, project, repositoryId, sourceRefName, targetRefName, title, description, isDraft }) => {
      const connection = await connectionManager.getConnection(organization);
      const gitApi = await connection.getGitApi();
      
      const prToCreate = {
        sourceRefName,
        targetRefName,
        title,
        description,
        isDraft
      };
    
      const pr = await gitApi.createPullRequest(prToCreate, repositoryId, project);
      
      return {
        content: [{ type: "text", text: JSON.stringify(pr, null, 2) }],
      };
    }
  • Zod schema defining the input parameters for the git_create_pull_request tool.
    {
      organization: z.string().describe("The name of the Azure DevOps organization"),
      project: z.string().describe("Project ID or name"),
      repositoryId: z.string().describe("The repository ID or name"),
      sourceRefName: z.string().describe("Source branch name (e.g. refs/heads/feature/my-feature)"),
      targetRefName: z.string().describe("Target branch name (e.g. refs/heads/main)"),
      title: z.string().describe("Title of the pull request"),
      description: z.string().optional().describe("Description of the pull request"),
      isDraft: z.boolean().optional().describe("Create as a draft PR"),
    },
  • Registration of the git_create_pull_request tool using server.tool, including name, description, input schema, and handler.
    server.tool(
      "git_create_pull_request",
      "Creates a new pull request in a repository",
      {
        organization: z.string().describe("The name of the Azure DevOps organization"),
        project: z.string().describe("Project ID or name"),
        repositoryId: z.string().describe("The repository ID or name"),
        sourceRefName: z.string().describe("Source branch name (e.g. refs/heads/feature/my-feature)"),
        targetRefName: z.string().describe("Target branch name (e.g. refs/heads/main)"),
        title: z.string().describe("Title of the pull request"),
        description: z.string().optional().describe("Description of the pull request"),
        isDraft: z.boolean().optional().describe("Create as a draft PR"),
      },
      async ({ organization, project, repositoryId, sourceRefName, targetRefName, title, description, isDraft }) => {
        const connection = await connectionManager.getConnection(organization);
        const gitApi = await connection.getGitApi();
        
        const prToCreate = {
          sourceRefName,
          targetRefName,
          title,
          description,
          isDraft
        };
    
        const pr = await gitApi.createPullRequest(prToCreate, repositoryId, project);
        
        return {
          content: [{ type: "text", text: JSON.stringify(pr, null, 2) }],
        };
      }
    );
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. While 'creates' implies a write/mutation operation, it doesn't specify permissions required, whether it's idempotent, what happens on conflicts, or what the response contains. For a creation tool with 8 parameters and no annotation coverage, this is insufficient behavioral context.

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, clear sentence that states the core functionality without unnecessary words. It's front-loaded with the essential action and resource, making it highly efficient and easy to parse.

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 creation tool with 8 parameters, no annotations, and no output schema, the description is incomplete. It doesn't explain what happens after creation, potential error conditions, or the return format. Given the complexity and lack of structured data, more context about the operation's behavior and outcomes is needed.

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%, meaning all parameters are documented in the schema itself. The description adds no additional parameter information beyond what's already in the schema. According to scoring rules, when schema coverage is high (>80%), the baseline is 3 even with no param info in the description.

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 ('creates') and resource ('new pull request in a repository'), making the purpose immediately understandable. However, it doesn't differentiate this tool from potential sibling tools like git_get_pull_request or git_get_pull_requests, which would require explicit comparison to achieve a perfect score.

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 existing branches), when not to use it, or how it differs from related tools like git_get_pull_request (which retrieves rather than creates). This leaves the agent without contextual usage instructions.

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/nikydobrev/mcp-server-azure-devops-multi'

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