Skip to main content
Glama
snow-wind-001

CodeRecoder MCP

Restore Code Backup

restore_project_snapshot
Destructive

Apply a previously previewed project restore using its unexpired confirmation token. Creates a verified safety backup and enables automatic rollback.

Instructions

Destructively apply a previously previewed restore. Requires the matching unexpired confirmation token. A verified pre-restore safety backup and automatic rollback are mandatory.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
snapshotIdYes
confirmationTokenYesToken returned by preview_project_restore after explicit user confirmation

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
dataNo
errorNo
messageYes
successYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed7 schema fields changedv3.1.0
    • addedInput schema / $schema
      Added value: +"http://json-schema.org/draft-07/schema#"
    • addedInput schema / properties / confirmationToken
      Added value: +{
      +  "description": "Token returned by preview_project_restore after explicit user confirmation",
      +  "format": "uuid",
      +  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$",
      +  "type": "string"
      +}
    • removedInput schema / properties / snapshotId / description
      Removed value: -"ID of the snapshot to restore"
    • addedInput schema / properties / snapshotId / format
      Added value: +"uuid"
    • addedInput schema / properties / snapshotId / pattern
      Added value: +"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$"
    • changedInput schema / required
      Previous value: -[
      -  "snapshotId"
      -]New value: +[
      +  "snapshotId",
      +  "confirmationToken"
      +]
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "$schema": "http://json-schema.org/draft-07/schema#",
      +  "additionalProperties": false,
      +  "properties": {
      +    "data": {
      +      "additionalProperties": {},
      +      "propertyNames": {
      +        "type": "string"
      +      },
      +      "type": "object"
      +    },
      +    "error": {
      +      "type": "string"
      +    },
      +    "message": {
      +      "type": "string"
      +    },
      +    "success": {
      +      "type": "boolean"
      +    }
      +  },
      +  "required": [
      +    "success",
      +    "message"
      +  ],
      +  "type": "object"
      +}
  2. First observedv1.1.0

TDQS

A4.3/5.0
Behavior5/5

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

Annotations already declare destructiveHint=true and idempotentHint=false, and the description adds substantial extra context: the required unexpired confirmation token, the mandatory pre-restore safety backup, and the automatic rollback guarantee. These are real behavioral guarantees an agent cannot infer from the schema or annotations.

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?

Three tight sentences, front-loaded with the destructive nature and followed by the required inputs and built-in safeguards. No filler and nothing repeated from structured fields.

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 destructive, non-idempotent mutation with an output schema, the description covers what the agent needs: danger level, the mandatory prerequisite token, and the safety-backup/rollback behavior. Nothing essential to a correct call is missing.

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 50%: the schema documents confirmationToken's origin but leaves snapshotId undocumented. The description adds useful semantics for the token (must be matching and unexpired) but says nothing about snapshotId, so it only partly compensates for the coverage gap.

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?

States a specific verb (apply) and scope (a previously previewed restore), making it clearly distinct from the sibling preview_project_restore and the snapshot lifecycle tools. It does not name the preview sibling explicitly, but 'previously previewed restore' effectively ties it to that step.

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?

Establishes the sequencing prerequisite (a prior preview producing a confirmation token) and the validity condition (token must be unexpired and matching). It does not explicitly tell the agent to call preview_project_restore first, but the reference is unambiguous enough to route usage.

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