Skip to main content
Glama
jesspig

git-mcp-server

by jesspig

git_reflog

Read-onlyIdempotent

Show reflog entries for any ref to recover lost commits after resets or branch deletions and trace HEAD history.

Instructions

Show the reflog for a ref (default HEAD), recording every local HEAD movement even after branch deletions or resets. Use this to recover lost commits after a reset or branch delete, and to answer 'where was HEAD before?'. Best for: recovering lost commits and understanding HEAD history. Returns: 'Showing reflog entries for .' followed by reflog text, or 'No reflog entries found.'; pass ref to inspect a specific branch. Does NOT show regular commit history — use git_log for that; pair with git_reset to restore a commit found here.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
refNoRef to inspect, defaults to HEAD
max_countNoMaximum number of reflog entries to show
repo_pathNoPath to the git repository, defaults to '.' (the server working directory).
Behavior5/5

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

Beyond the readOnlyHint/idempotentHint/destructiveHint annotations, the description discloses return format ('Returns: "Showing <N> reflog entries for <ref>." followed by reflog text...'), behavior ('recording every local HEAD movement even after branch deletions or resets'), and boundary ('Does NOT show regular commit history'). This gives the agent a clear model of what happens without invoking the tool.

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

Conciseness5/5

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

The description is well-organized with front-loaded behavior, followed by usage guidance, return format, and exclusions. Every sentence contributes value and is specific rather than redundant. The structure with 'Best for:', 'Returns:', and 'Does NOT' makes it easy to parse.

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 relatively simple read-only tool, the description covers purpose, usage scenarios, return format, and alternatives. Combined with the comprehensive schema and annotations, the agent has all necessary context. No output schema exists, but the description explicitly states what the return text looks like, filling that gap.

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% with clear descriptions for all three parameters. The tool description adds only a minor clarification that passing a ref inspects a specific branch, but does not elaborate on max_count or repo_path. The schema already carries the parameter semantics adequately, so a baseline of 3 is appropriate.

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?

The description clearly states the tool's function: 'Show the reflog for a ref (default HEAD), recording every local HEAD movement even after branch deletions or resets.' It includes the specific resource (reflog for a ref) and distinguishes from siblings by explicitly stating 'Does NOT show regular commit history — use git_log for that; pair with git_reset to restore a commit found here.'

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

Usage Guidelines5/5

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

Usage context is explicit: 'Use this to recover lost commits after a reset or branch delete, and to answer "where was HEAD before?"' The exclusion is also clear: 'Does NOT show regular commit history — use git_log for that; pair with git_reset to restore a commit found here.' This provides both when-to-use and when-not-to-use guidance with a named alternative.

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

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