Skip to main content
Glama

ScriptGrain

Restore an earlier version of a draft

restore_draft_version

Put an earlier version back as the draft's text (with the score it had). The text it replaces is itself kept as a version, so a restore can be undone the same way. Refused while a long draft is still being written. Returns the draft as get_generation does. Free.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
version_idYesA version id from list_draft_versions.
generation_idYesThe draft's generation id.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.5/5.0
Behavior5/5

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

Adds rich context beyond the annotations: the replaced text is itself preserved as a version so the restore is undoable, the operation is refused during in-progress writing, the response shape matches get_generation, and it is free. These properties reconcile and extend the declared destructiveHint=false / idempotentHint=false hints.

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?

Four short sentences, each carrying distinct information (effect, undo semantics, refusal condition, return shape), with the primary effect front-loaded and the 'Free.' note ending cleanly.

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?

With no output schema, the description compensates by stating the return mirrors get_generation, and it covers the mutation's reversibility, failure mode, and cost. An agent has everything needed to call it correctly.

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%, and the schema already documents both uuid parameters (including that version_id comes from list_draft_versions). The description adds nothing about parameter format or selection, so the baseline 3 applies.

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 verb (restore), resource (an earlier version of a draft) and the effect (becomes the draft's text, with its score). This clearly separates it from list_draft_versions (which enumerates versions) and get_generation (which it cites only as a return-shape reference).

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 concrete precondition that acts as a when-not rule: 'Refused while a long draft is still being written.' It does not name alternative tools or explicitly say when a restore is preferable to other actions, so it stops short of full routing guidance.

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