Skip to main content
Glama

git_discard_changes

Revert your repository to the last commit by discarding all uncommitted changes and removing untracked files.

Instructions

discards all uncommitted changes and removes untracked files this tool reverts the repository to the state of the last commit (head)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. First observedv0.1.0

TDQS

A4.5/5.0
Behavior4/5

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

With no annotations, the description carries the full behavioral disclosure burden. It clearly states the destructive side effects: discarding all uncommitted changes, removing untracked files, and restoring the repository to HEAD. It does not explicitly warn about irreversibility, but 'discards' and 'removes' strongly imply data loss.

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?

Two short sentences deliver the full behavior with no filler. The destructive action is front-loaded, and the explicit 'all' and 'HEAD' qualifiers add useful precision without bloat.

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 zero-parameter destructive tool, the description fully specifies what changes are discarded, that untracked files are also removed, and the exact target state. An output schema exists, so return-value details are covered elsewhere.

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?

The tool has zero parameters, so schema description coverage is effectively 100% and no parameter-level documentation is needed. This matches the baseline for parameterless tools.

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 action and resource: it discards all uncommitted changes, removes untracked files, and reverts to HEAD. This is unambiguous and distinguishes the tool from sibling upload/pull operations.

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?

The description gives clear context for when the tool is appropriate: whenever the goal is to abandon all uncommitted work and clean untracked files. It does not explicitly compare against alternatives or provide when-not-to-use guidance, but the intended use case is unambiguous.

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

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/maxwellaguiarsilva/project-mcp-tools'

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