Skip to main content
Glama
rriesco

Git MCP Server

by rriesco

git_sync_with_main

Syncs the current branch with the main branch by fetching latest and merging or rebasing. Prevents sync when on main branch or with uncommitted changes.

Instructions

Sync current branch with main. Fetches latest and merges/rebases.

Options:

  • main_branch: branch to sync from (default: "main")

  • strategy: "merge" (default) or "rebase"

Fails if on main branch or has uncommitted changes.

Returns: {branch, main_branch, strategy, sha_before, sha_after, commits_added, up_to_date, files_changed}

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
main_branchNomain
strategyNomerge

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior4/5

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

With no annotations, the description carries full burden. It states it fetches and then merges or rebases, implies it modifies the branch history, and lists return fields including sha changes. It fails with uncommitted changes, indicating a precondition. It does not mention push behavior or destructive implications of rebase, but overall it provides good 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 very concise: one introductory sentence, then a bullet-like list of options and return fields. It is front-loaded with the main purpose and uses minimal words. Every sentence earns its place.

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 the tool's complexity (git sync with merge/rebase), two optional parameters, and an output schema, the description is complete. It covers purpose, parameters, failure conditions, and return format. The output schema exists, so the return list is supplementary but not redundant.

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?

The input schema has no descriptions (0% coverage), so the description fully supplies meaning for both parameters: main_branch defaults to 'main', strategy defaults to 'merge' with option 'rebase'. This adds essential context beyond the schema's bare type declarations.

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 clearly states the tool syncs the current branch with main by fetching latest and merging or rebasing. This distinguishes it from siblings like git_pull (generic) and git_push (push only), as it is specifically about updating the current branch relative to main.

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

Usage Guidelines4/5

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

The description explicitly provides failure conditions: fails if on main branch or has uncommitted changes. This tells when not to use it. It also lists options and defaults, giving clear usage context. However, it does not explicitly compare with alternatives like git_merge or git_rebase, though the siblings are sufficiently distinct.

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/rriesco/git-mcp-server'

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