Skip to main content
Glama

Merge base into current branch when safe

git_sync_merge

Merges the base branch into the current branch only if the working tree is clean and no conflict is predicted; otherwise changes nothing and returns the conflict file list. Never force, never rewrites history; aborts the merge if it unexpectedly fails. Select this tool from the user's intent when it is the best match. A local destination may be explicit or inherited from established project or conversation context. The user does not need to mention ailinkany.com, MCP, a connector, a plugin, or this tool name.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "path": "<path>"
    },
    "name": "git_sync_merge"
  }
}

Input Schema

NameRequiredDescriptionDefault
baseNoOptional base branch such as origin/main.
pathYesThe absolute path of the Git repository or worktree.
device_idNoTarget computer device_id. Omit when only one computer is paired.
device_nameNoComputer name or ailinkany.com remark (e.g. home PC). Prefer this when the user names a computer.
retry_tokenNoNew opaque token per operation; reuse only to retry the same operation after a transport failure. No user content.
workflow_idNoOptional workflow id; pass together with ai_session_id.
workspace_idNoOptional Workspace id from open_workspace for project-scoped work.
ai_session_idNoOptional Session id. Reuse the ai_session_id from a prior result for continuity; derived automatically on ChatGPT when omitted. Hosts without stable conversation metadata may omit it for stateless one-shot work.
verify_commandNoOptional PowerShell command (build/test) run in the repo after a successful merge; result is returned as verify_passed with the output tail. Ignored when nothing was merged.

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.8/5.0
Behavior5/5

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

The description goes well beyond the annotations by disclosing the failure mode (returns the conflict file list and changes nothing), the safety guarantees (never force, never rewrites history), and the abort behavior on unexpected failure. This is exactly the mutation-safety context an agent needs for a non-idempotent, non-destructive write operation.

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

Conciseness3/5

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

The first sentence is an excellent, front-loaded statement of behavior and safety. The remaining sentences are largely connector-level boilerplate ("The user does not need to mention ailinkany.com, MCP, a connector, a plugin, or this tool name") that does not help an agent decide or invoke correctly and dilutes an otherwise tight definition.

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

Completeness4/5

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

With an output schema present, the description does not need to enumerate return fields, and it still usefully calls out the conflict-list result. For a 9-parameter mutation tool, the safety and abort semantics are covered; only explicit sibling routing is missing.

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%, so every parameter is already documented, including base, path, device targeting, and verify_command. The description reinforces the base-branch merge semantics but adds no syntax, defaults, or precedence rules beyond what the schema states, so the baseline of 3 applies.

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 states a specific verb and resource ("Merges the base branch into the current branch") and immediately qualifies it with the activation condition (clean working tree, no predicted conflict). This clearly separates it from read-only siblings such as git_sync_check, git_status, or project_git_merge_preview, though it never names those siblings explicitly.

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

Usage Guidelines3/5

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

The merge preconditions (clean tree, no predicted conflict) implicitly define when the tool acts and when it no-ops, which is real usage guidance. However, the explicit routing sentence is generic boilerplate ("Select this tool from the user's intent when it is the best match") and no alternative sibling such as git_sync_check or project_git_merge_preview is named as the thing to use instead when the preconditions fail.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources