Skip to main content
Glama

git_revert

Destructive

Revert an ordered list of commits without opening an editor, enabling scripted or automated rollback workflows.

Instructions

Revert an ordered commit list without opening an editor.

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": {
      "revisions": "<revisions>"
    },
    "name": "git_revert"
  }
}

Input Schema

NameRequiredDescriptionDefault
mainlineNo
revisionsYes

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

C2.9/5.0
Behavior3/5

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

Annotations already declare destructiveHint=true and readOnlyHint=false, so the safety profile is covered. The description adds a genuine behavioral fact beyond the annotations: the operation is non-interactive and processes commits in list order. It omits what an agent most needs to know for a destructive git operation — conflict handling, whether a revert commit is created, and how to abort or continue.

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 front-loaded sentence with no filler or redundant restatement of the tool name. It is arguably over-terse for a destructive git operation, but nothing in it is wasted.

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?

For a destructive, conflict-prone git operation with two undocumented parameters (one of which is semantically non-obvious) the description is too thin. An output schema exists so return values need not be explained, but the missing conflict/continue semantics and mainline meaning leave real gaps an agent would hit in practice.

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 description coverage is 0%, so the description must carry parameter meaning, and it largely does not. "Ordered commit list" loosely maps to the `revisions` array order, but the `mainline` parameter — required when reverting a merge commit — is never mentioned and would be unintelligible to an agent from the schema alone (a bare integer, min 1).

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 and resource ("Revert an ordered commit list") and adds the non-interactive qualifier "without opening an editor," which tells the agent what this does differently from a raw git revert shell call. It does not name or distinguish itself from nearby siblings such as git_cherry_pick, git_restore, or git_continue, so the agent must infer the boundary.

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?

There is no statement of when to use this versus git_cherry_pick or git_restore, no mention of preconditions (clean working tree, resolved conflicts), and no pointer to git_continue for resuming an interrupted revert, despite that sibling existing. The only guidance is the implied 'no editor' behavior.

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