Skip to main content
Glama

git_recover

Recover a deleted file by searching the entire commit history for the last version that still had content, then write it back into the mirror. Use when a script is gone and the commit is unknown.

Instructions

Bring back a deleted file: searches all history for the last commit where the file still had content and writes it back into the mirror. Use it when a script is gone and you don't know which commit had it; if you know the commit, git_restore with source does the same. Says so if the file was never committed.

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": {
      "path": "<path>"
    },
    "name": "git_recover"
  }
}

Input Schema

NameRequiredDescriptionDefault
pathYesPath of the lost file. File path relative to the mirror folder, as git_status or git_log prints it, e.g. "ServerScriptService/Main.server.luau". It must match the path it was committed under.
placeNoTarget place (PlaceId or project name) whose mirror repo to use. Defaults to the bound/sole connected place.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv0.1.1
    • changedInput schema / properties / path / description
      Previous value: -"the Studio-path-style file path that was lost"New value: +"Path of the lost file. File path relative to the mirror folder, as git_status or git_log prints it, e.g. \"ServerScriptService/Main.server.luau\". It must match the path it was committed under."
    • changedInput schema / properties / place / description
      Previous value: -"Target place (PlaceId or project name); defaults to the bound/sole place"New value: +"Target place (PlaceId or project name) whose mirror repo to use. Defaults to the bound/sole connected place."
  2. First observedv0.1.0

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=false, destructiveHint=false and idempotentHint=false, so the safety profile is known; the description adds beyond that by explaining the history-scan mechanism, that content is written back into the mirror, and the failure case ('Says so if the file was never committed'). It stops short of saying what happens if a file already exists at that path or what the successful response contains.

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 sentences, zero waste, and the core action is front-loaded before the disambiguation note. Every clause earns its place by either describing behavior or routing the agent.

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 2-parameter mutation with full schema coverage and annotations, the description covers what it does, when to use it, the alternative, and one failure mode. The only gap is the return value (e.g. which commit it recovered from), which matters because there is no output schema.

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 both 'path' and 'place' already documented in detail, so the baseline is 3. The description adds only indirect meaning ('searches all history', 'last commit where the file still had content') that hints at the path-matching constraint the schema already spells out.

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?

States a specific action ('bring back a deleted file') plus the mechanism (searches all history for the last commit where the file had content and writes it into the mirror). It explicitly distinguishes itself from the nearest sibling, git_restore, so an agent can choose without opening either schema.

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?

Gives an explicit trigger ('when a script is gone and you don't know which commit had it') and an explicit alternative with its condition ('if you know the commit, git_restore with source does the same'). Nothing is left to inference about which of the two to pick.

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