Skip to main content
Glama
Cloady

Cloady

Official
by Cloady

Discard Git Changes

discardGitChanges
Destructive

Revert edited and deleted files to the last commit and delete new files at specified paths, permanently discarding those Git changes in a Cloady development app.

Instructions

Discard every change at the given paths: edited and deleted files go back to the last commit, and new files are deleted, staged or not. Paths are literal, never patterns. Fails before changing anything if a path has no change, and afterwards, naming what is left, if any of those paths still shows one. The discarded work can't be recovered. Works only on a development app: any other app answers 403 read_only. Runs git in the app's running container and returns its output.

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": {
      "workspaceSlug": "<workspaceSlug>",
      "appSlug": "<appSlug>"
    },
    "name": "discardGitChanges"
  }
}

Input Schema

NameRequiredDescriptionDefault
envNo
regionNo
appSlugYes
requestBodyNoThe JSON request body.
workspaceSlugYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.18.0

TDQS

A4.4/5.0
Behavior5/5

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

Goes well beyond the destructiveHint/readOnlyHint annotations: irreversibility ('discarded work can't be recovered'), atomic all-or-nothing validation, a post-check that reports remaining changes by name, the 403 read_only restriction to development apps, literal-path matching, and that it shells out to git in the running container and returns that output.

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?

Five tight sentences, each carrying distinct information: scope, path semantics, failure behavior, irreversibility, environment restriction, execution model. Consequences of calling it are front-loaded and nothing is redundant.

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

Completeness4/5

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

For a destructive mutation with no output schema, it covers the essentials an agent needs: what gets destroyed, atomic failure modes, permission/environment gating, and the rough shape of the return (git output). The main gap is the unexplained region parameter and no note on batching limits despite maxItems of 500.

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 coverage is only 20%, and the description meaningfully clarifies the most important parameter by stating paths are literal, never patterns. However, workspaceSlug, appSlug, and especially region are undocumented in both schema and description, and env is only indirectly covered via the development-only restriction, so it does not fully compensate for the coverage gap.

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?

Names a specific verb and resource (discard changes at given paths) and precisely defines semantics: edited/deleted files revert to last commit, new files are deleted, staged or not. This clearly separates it from siblings like revertGitCommit (commit-level) or checkoutGitBranch, so an agent can pick it without opening another schema.

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?

Gives a strong when-to-use context by stating it works only on a development app and that any other app returns 403 read_only, plus the failure conditions (path with no change aborts the whole operation). It does not explicitly name an alternative for inspecting changes first (e.g. getGitDiff) or for restoring a commit, so routing is implied rather than spelled out.

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

Deploy Server

Other Tools