Skip to main content
Glama

Git Push

git_push

Push local Git commits to a remote repository to share code changes, create backups, and synchronize work with your team.

Instructions

Push changes to a remote repository. Uploads local commits to the remote branch.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pathNoPath to the Git repository. Defaults to session working directory set via git_set_working_dir..
remoteNoRemote name (default: origin).
branchNoBranch name (default: current branch).
forceNoForce push (overwrites remote history).
forceWithLeaseNoSafer force push - only succeeds if remote branch is at expected state.
setUpstreamNoSet upstream tracking relationship for the branch.
tagsNoPush all tags to the remote.
dryRunNoPreview the operation without executing it.
deleteNoDelete the specified remote branch.
remoteBranchNoRemote branch name to push to (if different from local branch name).
confirmedNoExplicit confirmation required for force push or branch deletion on protected branches (main, master, production, etc.).

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
successYesIndicates if the operation was successful.
remoteYesRemote name that was pushed to.
branchYesBranch that was pushed.
upstreamSetYesWhether upstream tracking was set for the branch.
pushedRefsYesReferences that were successfully pushed.
rejectedRefsYesReferences that were rejected by the remote.
Behavior2/5

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

While the annotation indicates readOnlyHint: false, the description fails to disclose critical behavioral traits: that this modifies remote state destructively (force/delete options), requires network connectivity and authentication, or that the 'confirmed' parameter gates dangerous operations on protected branches. The schema reveals these capabilities but the description doesn't contextualize the risks.

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?

The description is efficiently structured with two short sentences and no wasted words. However, it errs on the side of excessive brevity given the tool's complexity, missing an opportunity to front-load safety warnings about destructive operations.

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?

Despite comprehensive schema coverage and an output schema existing, the description is inadequate for an 11-parameter tool with destructive capabilities. It fails to explain the safety mechanisms (confirmed parameter), the implications of force pushing, or workflow prerequisites (e.g., committing first), leaving significant gaps an agent would need to discover through trial or schema inspection alone.

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?

With 100% schema description coverage, the baseline is appropriately 3. The description adds no parameter-specific guidance (e.g., explaining when to use forceWithLease versus force, or the interaction between branch and remoteBranch), relying entirely on the schema's individual field descriptions.

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 tool uploads local commits to a remote repository using specific verbs ('Push', 'Uploads'). However, it lacks explicit differentiation from sibling tools like git_fetch (download) or git_pull (download+merge), which could help an agent choose correctly in workflows involving remote synchronization.

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 (e.g., git_push vs git_fetch), prerequisites (commits must exist locally, remote must be configured), or when to use specific modes like force push versus standard push. The agent must infer usage solely from the parameter schema.

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

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