Skip to main content
Glama
Tiberriver256

Azure DevOps MCP Server

create_commit

Create a commit on an Azure DevOps Git branch using file changes via search/replace or unified diff formats.

Instructions

Create a commit on an existing branch using file changes.

  • Provide plain branch names (no "refs/heads/").

  • ⚠️ Each file path may appear only once per commit request—combine all edits to a file into a single change entry.

  • Prefer multiple commits when you have sparse or unrelated edits; smaller focused commits keep review context clear.

🎯 RECOMMENDED: Use the SEARCH/REPLACE format (much easier, no line counting!).

Option 1: SEARCH/REPLACE format (EASIEST) Simply provide the exact text to find and replace:

{
  "changes": [{
    "path": "src/api/services/function-call.ts",
    "search": "return axios.post(apiUrl, payload, requestConfig);",
    "replace": "return axios.post(apiUrl, payload, requestConfig).then(r => { processResponse(r); return r; });"
  }]
}

The server fetches the file, performs the replacement, and generates the diff automatically. No line counting, no hunk headers, no context lines needed!

Option 2: UNIFIED DIFF format (Advanced) If you prefer full control, provide complete unified diffs:

  • Each patch MUST have complete hunk headers: @@ -oldStart,oldLines +newStart,newLines @@

  • CRITICAL: Every @@ marker MUST include line numbers. Do NOT use @@ without line ranges.

  • Include 3-5 context lines before and after changes.

  • For deletions: --- a/filepath and +++ /dev/null

  • For additions: --- /dev/null and +++ b/filepath

Example unified diff:

{
  "changes": [{
    "patch": "diff --git a/file.yaml b/file.yaml\n--- a/file.yaml\n+++ b/file.yaml\n@@ -4,7 +4,7 @@ spec:\n spec:\n   type: ClusterIP\n   ports:\n-    - port: 8080\n+    - port: 9090\n       targetPort: http\n"
  }]
}

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
projectIdNoThe ID or name of the project (Default: MyProject)
organizationIdNoThe ID or name of the organization (Default: mycompany)
repositoryIdYesThe ID or name of the repository
branchNameYesThe branch to commit to (without "refs/heads/", e.g., "codex/test2-delete-main-py")
commitMessageYesCommit message
changesYesList of file changes as either unified git diffs OR search/replace pairs
Behavior4/5

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

No annotations provided, so description bears full burden. It describes that the server fetches files for SEARCH/REPLACE and generates diffs automatically, and warns about parsing failures for missing line numbers in hunks. However, it does not explicitly state that changes are committed immediately or mention rollback possibilities. Nonetheless, the behavior is adequately transparent for a commit operation.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Description is fairly long but well-organized with headers, bullet points, and code blocks. It front-loads key information. Some redundancy exists (e.g., line number warning appears in both description and parameter descriptions), but overall structure is clear and effective.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given 6 parameters (4 required), no output schema, and multiple input formats, the description covers all essential aspects: purpose, input options (with examples), constraints, and usage tips. It is comprehensive enough for an agent to correctly invoke the tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, but description adds substantial value by explaining the two change formats (search/replace vs patch), clarifying that path is optional for patch but required for search/replace, and providing detailed examples. It also adds constraints like unique file paths per commit, which are not in schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description explicitly states 'Create a commit on an existing branch using file changes.' It clearly distinguishes from sibling tools like create_branch and create_pull_request by focusing only on committing changes to an existing branch.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Provides explicit guidance on when to use this tool (committing to existing branches), contrasts with other operations, recommends using the SEARCH/REPLACE format for ease, advises preferring multiple commits for sparse edits, and warns that each file path may appear only once per commit.

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

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