Skip to main content
Glama

git_rebase

Destructive

Rebase the current branch onto a specified resolved commit without interactive editing or automatic stashing, enabling controlled history updates in ForgeMCP.

Instructions

Rebase onto one resolved commit without interactive editing or automatic stash.

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": {
      "revision": "<revision>"
    },
    "name": "git_rebase"
  }
}

Input Schema

NameRequiredDescriptionDefault
revisionYes

Output Schema

NameRequiredDescriptionDefault
errorNo
changesYes
updatesNo
conflictsYes
operationYes
head_afterYes
head_beforeYes
process_idsYes
synchronization_errorNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.5.1

TDQS

B3.2/5.0
Behavior4/5

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

Annotations already declare destructiveHint=true and readOnlyHint=false, so the risk profile is known. The description adds genuinely new behavioral facts: no interactive editing and no automatic stash, which tells the agent it must handle uncommitted changes itself (e.g. via git_stash). It stops short of describing what happens on conflict or that history is rewritten.

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?

One tight sentence with the key constraint front-loaded and no filler. It is arguably over-compressed given how much behavior is left unstated, but nothing present is wasted.

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

Completeness3/5

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

An output schema exists, so return values need no explanation, and annotations carry the safety profile. However, for a destructive history-rewriting operation with zero schema coverage on its only parameter, the description should mention conflict handling and the clean-tree requirement to be complete.

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

Parameters2/5

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

Schema coverage is 0% — the single 'revision' parameter has no description at all. The phrase 'one resolved commit' hints that the revision must resolve to a single commit rather than a range, but the accepted formats (SHA, branch name, HEAD~n) are never stated, so the description only partially compensates.

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?

States a specific verb (rebase) and target (one resolved commit), and the qualifiers 'without interactive editing or automatic stash' distinguish it from a general rebase. It does not name the nearest siblings (git_merge, git_cherry_pick) as alternatives, so differentiation is implicit rather than explicit.

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?

No guidance on when to choose rebase over git_merge or git_cherry_pick, and no mention of prerequisites such as a clean working tree. Critically, the sibling git_continue exists for resuming after conflicts, yet the description never says to use it when a rebase stops on conflicts.

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