Skip to main content
Glama

Push current Git branch safely

git_push
Destructive

Pushes ONLY the currently checked-out Git branch to the same-name branch on a configured remote. No --force, deletes, tags or arbitrary refspecs. Specify the branch explicitly and, if available, expected_head as a 40/64-hex SHA to prevent a stale push. Reports Git push exit status separately from remote verification. A successful push may return remote_verification_status=UNVERIFIED or MISMATCH if post-push ls-remote fails or sees another SHA; never blindly retry because the remote may already have changed. push_applied=true means Git exited 0, while push_applied=null means the actual remote effect is uncertain. This mutates an external Git remote and may require normal Host approval. 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>",
      "branch": "<branch>"
    },
    "name": "git_push"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathYesAbsolute path of the authorized local Git repository.
branchYesExact checked-out local branch. The remote branch must have the same name.
remoteNoConfigured Git remote name, e.g. origin, not a URL.origin
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.
expected_headNoOptional full local commit SHA supplied by the caller as a stale-state guard.

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.5/5.0
Behavior5/5

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

Annotations already flag destructive/openWorld/non-idempotent; the description goes well beyond them by explaining the two-phase result model (Git exit status vs. remote verification), what UNVERIFIED/MISMATCH mean, that push_applied=true only means exit code 0, and that push_applied=null means remote effect is uncertain. It also discloses the non-retry hazard and possible Host approval, which are exactly the behaviors an agent needs before calling a mutating push.

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 opening sentences are front-loaded and dense with real signal, but the trailing block ("Select this tool from the user's intent when it is the best match... The user does not need to mention ailinkany.com, MCP, a connector, a plugin, or this tool name") is meta filler that does not help select or invoke the tool. Roughly a quarter of the text could be cut without losing operational information.

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?

For a 10-parameter destructive remote mutation with full schema coverage and an output schema, the description covers the risky edges: scope limits, stale-state guarding, ambiguous result states, and retry hazards. An agent has everything needed to call it correctly and interpret an ambiguous success.

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

Parameters4/5

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

Schema description coverage is 100%, so the baseline is 3; the description earns more by giving expected_head a purpose (stale-push guard), restating the branch/remote same-name constraint, and framing path/remote as the authorized local repo and a configured remote name rather than a URL. It does not add anything about the device/session/workflow routing parameters, which is the main residual gap.

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?

"Pushes ONLY the currently checked-out Git branch to the same-name branch on a configured remote" states a specific verb, resource, and scope, then explicitly excludes force-pushes, deletes, tags, and arbitrary refspecs. An agent can distinguish it from git_fetch, git_sync_check, or git_sync_merge without opening any schema.

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?

It gives clear situational context (checked-out branch only, expected_head to guard against stale state) and concrete anti-usage guidance ("never blindly retry because the remote may already have changed"). It lacks an explicit named alternative such as "run git_sync_check first" or "use git_sync_merge for integrating remote changes," so routing between Git siblings is still partly inferred.

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