Skip to main content
Glama

Restore files

code_restore
Destructive

Put a file, a folder, or a whole tree back as it stood after a change, as a new change.

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>",
      "changeId": "<changeId>",
      "org": "<org>"
    },
    "name": "code_restore"
  }
}

Input Schema

NameRequiredDescriptionDefault
orgYesslug of the organization whose trees and sites to use. Required on every call, even when only one organization is listed; a path never names it.
pathYesWhat to restore; <tree>: restores everything.
messageNoA brief note on the change.
changeIdYesThe change to restore to.
ifChangeNoRefuse unless the tree's latest change is still this one.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.5/5.0
Behavior4/5

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

Annotations already mark this as destructive and non-read-only. The description adds meaningful context beyond that: restoration creates a new change rather than rewriting history, and it can target a file, folder, or entire tree. It still does not spell out overwrite effects on current state or permission requirements.

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?

A single front-loaded sentence with no filler. It states the action, scope, and key result efficiently.

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

Completeness3/5

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

For a destructive restore tool, the description covers purpose and the new-change behavior but omits what happens to current contents, files added after the target change, and any authorization constraints. The schema covers parameters fully, and no output schema exists, but behavioral completeness is only moderate.

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%, so parameters are already well documented. The description reinforces that path may be a file/folder/tree and that restoration targets a prior change, but it adds no syntax or format details beyond the schema.

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?

The description gives a specific restore verb and resource scope (file, folder, whole tree) and notes that the result is a new change. It is clear, but it does not explicitly distinguish itself from sibling tools such as code_changes or code_getChange.

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?

It implies the tool is for restoring content to a prior change, but provides no explicit when-to-use, when-not-to-use, prerequisites, or named alternatives. An agent must infer usage from the verb alone.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources