Skip to main content
Glama

Restore a record to a previous version

restore_resource

Revert a content record or datasource to a previous committed version, using a commit hash or undoing the latest change. The restore goes through the same gated write path and is itself committed.

Instructions

Revert a content record — or a datasource — to a prior committed version and write it back through the same gated write path as any other update (a DELETED block is recreated under its old id; a datasource restore needs data writes enabled). Omit ref to undo the most recent change, or pass a commit hash from vc_log; inspect it first with vc_diff. The restore is itself committed. Requires PORTAL_VC_DIR. NOT covered (never snapshotted): users, groups, permissions, credentials, api_keys, system records, db_modifications.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesRecord id.
refNoGit commit hash/ref to restore from. Default: the version before the latest change to this record.
resourceYesRecord kind: 'block', a content resource key (layout, query, theme, partial, snippet, translation, dashboard, tag), or 'datasource'.
Behavior5/5

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

Beyond annotations, the description reveals that the restore writes through the gated write path, is itself committed, recreates DELETED blocks under their old id, and requires PORTAL_VC_DIR. It also defines the open-world boundary by naming never-snapshotted record kinds. This does not contradict the 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?

The core action is front-loaded, and every clause adds useful detail: side effects, prerequisites, source of ref, and exclusions. Despite its density, there is no redundant text, making it appropriately sized for the tool's complexity.

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 mutation tool with no output schema, the description covers prerequisites, side effects, ref sourcing, and unsupported resources. The only notable omission is the return/response behavior, which the absence of an output schema leaves to inference.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema already documents all three parameters with 100% coverage, so the baseline is 3. The description adds operational meaning by explaining the default ref behavior ('the version before the latest change'), pointing users to vc_log for valid refs, and clarifying datasource requirements.

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?

The description states a specific action ('revert... to a prior committed version'), the target resources ('content record or a datasource'), and the write-back effect. This clearly distinguishes restore_resource from inspection siblings like vc_diff and vc_log.

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?

It gives explicit when-to-use guidance: omit ref to undo the latest change, or pass a commit hash from vc_log after inspecting with vc_diff. It also names prerequisites (PORTAL_VC_DIR, data writes enabled for datasource) and lists unsupported resource types, which tells an agent when not to use the tool.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/zuarbase/Zuar-Portal-MCP-Public'

If you have feedback or need assistance with the MCP directory API, please join our Discord server