Skip to main content
Glama

Revert note to exact history

revert_note
DestructiveIdempotent

Restore a note to a previous saved state by supplying its content hash. Reverts bad writes with exact byte recovery, while keeping the revert reversible and logged.

Instructions

Use this to undo a bad write by restoring exact prior bytes. Restore a note to exact content-addressed history bytes. Pass the current content_hash as expected_hash for CAS. The revert is itself durable, reversible, indexed, and operation-logged.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
noteYes
to_hashYes
request_idNo
expected_hashNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
indexedYes
rel_pathNo
replayedNo
revertedNo
committedNo
content_hashYes
operation_idNo

Schema Changelog

Changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. Changed9 schema fields changedv0.1.5
    • addedInput schema / properties / request_id
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "title": "Request Id"
      +}
    • addedOutput schema / properties / committed
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "boolean"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "title": "Committed"
      +}
    • addedOutput schema / properties / operation_id
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "title": "Operation Id"
      +}
    • addedOutput schema / properties / rel_path
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "title": "Rel Path"
      +}
    • addedOutput schema / properties / replayed
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "boolean"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "title": "Replayed"
      +}
    • removedOutput schema / properties / reverted / $ref
      Removed value: -"#/$defs/RevertedNoteOutput"
    • addedOutput schema / properties / reverted / anyOf
      Added value: +[
      +  {
      +    "$ref": "#/$defs/RevertedNoteOutput"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • addedOutput schema / properties / reverted / default
      Added value: +null
    • changedOutput schema / required
      Previous value: -[
      -  "reverted",
      -  "content_hash",
      -  "indexed"
      -]New value: +[
      +  "content_hash",
      +  "indexed"
      +]
  2. First observedv0.1.0

TDQS

A4/5.0
Behavior4/5

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

Annotations already mark the tool as destructive and idempotent. The description adds valuable context by stating the revert is 'durable, reversible, indexed, and operation-logged,' and it explains the CAS expected_hash behavior. This goes beyond what annotations convey without contradicting them.

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 dense sentences with no filler. Purpose is front-loaded ('undo a bad write'), followed by the mechanism and durability guarantees. Every sentence contributes essential information.

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?

The description covers the primary use case, the key safety behavior (reversible, operation-logged), and the CAS parameter. With an output schema present and annotations providing the safety profile, this is mostly complete. It could mention how to obtain to_hash (e.g., via get_note_history), but this is a minor omission.

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 description coverage is 0%, so the description must compensate. It explains expected_hash ('Pass the current content_hash as expected_hash for CAS') and implies to_hash is the content-addressed history target. However, the 'note' and 'request_id' parameters receive no explicit semantic guidance, leaving an incomplete picture of all four parameters.

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?

The description clearly states the verb ('undo', 'restore') and resource ('note' / 'exact content-addressed history bytes'), making the tool's function obvious. It does not explicitly name or differentiate against sibling tools like patch_note_section or get_note_history, but the 'undo a bad write' framing is sufficiently distinct from normal edit operations.

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?

The description gives an explicit trigger condition: 'Use this to undo a bad write by restoring exact prior bytes.' This tells an agent when the tool is appropriate. It does not mention alternatives or explicitly say when not to use it, so it falls short of a 5.

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

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/VBlackJack/Datacron'

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