Skip to main content
Glama

restore_script_version

Restore a previous script version by version ID for a Takes session, saving the current text to history first so earlier edits can be recovered.

Instructions

Put an old version back (the current text is saved to history first).

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": {
      "session": "<session>",
      "version": "<version>"
    },
    "name": "restore_script_version"
  }
}

Input Schema

NameRequiredDescriptionDefault
sessionYesSession: 'Project/folder', an absolute path or its id (from get_session). Old paths still work.
versionYesVersion id from the history list.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv2026.11.11
    • changedInput schema / properties / session / description
      Previous value: -"Session as 'Project/folder', an absolute path, or its id (from get_session). An old path still works after a rename or move."New value: +"Session: 'Project/folder', an absolute path or its id (from get_session). Old paths still work."
  2. First observedv0.1.0

TDQS

B3.2/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=false and destructiveHint=false, so safety is partly covered. The description nonetheless adds real behavioral value by disclosing that the current text is snapshotted to history before the overwrite, which tells the agent the operation is recoverable — information not present in the annotations or schema.

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 clause-plus-parenthetical with zero filler, and the reversible-write caveat is attached directly to the action it modifies. Nothing needs to be trimmed or reordered.

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 two-parameter, fully documented tool with no output schema this is close to sufficient, and the history-save note covers the main behavioral risk. It still omits what the call returns (new version id? restored content?) and any prerequisite that the target must be an existing, unmodified session.

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 100%, with both `session` and `version` fully documented including the "Version id from the history list" provenance note. The description adds nothing about the identifiers, so the baseline 3 applies; there is no gap for it to compensate for.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose3/5

Does the description clearly state what the tool does and how it differs from similar tools?

"Put an old version back" states a recognizable action, but the description never names the resource being restored (a script, as opposed to the sibling restore_post_version's post). An agent must fall back on the tool name to tell which versioned object this applies to, so the purpose is understandable but not self-contained.

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?

There is no when-to-use guidance: nothing says to prefer this over restore_post_version, nor that a version id must first be obtained via script_history or get_script_version. The only hint is buried in the schema property text, not the description.

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