Skip to main content
Glama

Revert asset to a version

revert_asset
DestructiveIdempotent

Revert an asset to a prior version by version_number. Requires a write-scope token and versioning enabled on the workspace plan. A content-changing revert does NOT move the head back to N — it snapshots the current head as a new REVERT version and rotates the bytes to the target, so head_version_number moves FORWARD (old head + 1). A revert whose target content already matches the current head is a no-op (no new version, head unchanged) — this also covers a client-timeout retry of a just-completed revert. Note head_version_number is the next, not-yet-assigned number, so passing version_number equal to it is a benign no-op; the newest stored version is head_version_number − 1. On Free/Pro plans, reverting to a version older than the revert window is refused (revert_window_exceeded). Call list_asset_versions first to pick a valid, revertable version_number.

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": {
      "token": "<token>",
      "version_number": "<version_number>"
    },
    "name": "revert_asset"
  }
}

Input Schema

NameRequiredDescriptionDefault
tokenYesAsset token
commentNoOptional note recorded on the snapshot of the replaced head
organizationNoWorkspace slug, as returned by list_organizations. Omit it when the account has a single workspace — it is then resolved from your token. Pass it only when the account has several, or when you mean a workspace other than the obvious one.
version_numberYesVersion to revert to (>= 1, from list_asset_versions)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • removedInput schema / additionalProperties
      Removed value: -false
    • changedInput schema / properties / version_number / anyOf
      Previous value: -[
      -  {
      -    "minimum": 1,
      -    "type": "integer"
      -  },
      -  {
      -    "pattern": "^\\s*\\d+\\s*$",
      -    "type": "string"
      -  }
      -]New value: +[
      +  {
      +    "maximum": 9007199254740991,
      +    "minimum": 1,
      +    "type": "integer"
      +  },
      +  {
      +    "pattern": "^\\s*\\d+\\s*$",
      +    "type": "string"
      +  }
      +]
  2. Changed3 schema fields changed
    • addedInput schema / additionalProperties
      Added value: +false
    • removedInput schema / properties / context
      Removed value: -{
      -  "description": "Explain why you are calling this tool and how it fits into the user's overall goal. This parameter is used for analytics and user intent tracking. YOU MUST provide 15-25 words (count carefully). NEVER use first person ('I', 'we', 'you') - maintain third-person perspective. NEVER include sensitive information such as credentials, passwords, or personal data. Example (20 words): \"Searching across the organization's repositories to find all open issues related to performance complaints and latency issues for team prioritization.\"",
      -  "type": "string"
      -}
    • changedInput schema / required
      Previous value: -[
      -  "token",
      -  "version_number",
      -  "context"
      -]New value: +[
      +  "token",
      +  "version_number"
      +]
  3. First observed

TDQS

A4.6/5.0
Behavior5/5

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

Annotations already flag destructiveHint=true and idempotentHint=true, but the description adds the non-obvious mechanics those hints cannot convey: the head moves FORWARD to old head + 1 rather than back to N, the old head is snapshotted as a REVERT version, and matching-content reverts (including timeout retries) are no-ops. It also discloses auth/plan requirements (write-scope token, versioning enabled) and a named error code, which is exactly the extra context annotations cannot express.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The key action, auth requirement, and plan precondition are front-loaded, and nearly every sentence carries operational weight for a destructive call. It is dense but somewhat sprawling, with the no-op/head-number discussion spread across three segments that could be tightened into one.

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 mutation with no output schema, the description covers the semantic effects on version numbering, retry/timeout behavior, plan-based refusals, and the prerequisite discovery call — everything an agent needs to invoke it correctly and interpret the result.

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?

Schema coverage is 100%, so the baseline is 3, but the description adds real meaning to `version_number`: it explains that `head_version_number` is the next unassigned number, the newest stored version is head − 1, and passing head is a benign no-op. That is semantic guidance the schema's '>= 1, from list_asset_versions' does not provide; `comment` and `organization` remain covered only by their schema text.

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 opens with a specific verb+resource+selector: revert an asset to a prior version by `version_number`. It distinguishes the operation from siblings like `create_asset_version` and `update_asset` by explaining that the bytes are rotated to a target version while the old head is snapshotted.

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?

It gives an explicit prerequisite workflow: call `list_asset_versions` first and pick a `revertable` version_number. It also names refusal conditions (Free/Pro revert window → `revert_window_exceeded`, versioning must be enabled) and warns when the call is a no-op. What is missing is an explicit contrast with the non-revert alternative (`create_asset_version`) for agents that want to advance rather than roll back.

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