Skip to main content
Glama
Datris MCP Server

Datris MCP Server

restore_script_version

Restore an earlier version of a pipeline's AI data-quality rule or AI transformation by writing it back as a new latest version. Use it to roll back a script the pipeline runs.

Instructions

Make an earlier version of a pipeline's AI data-quality rule or AI transformation script the one the pipeline runs. APPEND-ONLY and SIDE-EFFECTING: the restore writes the chosen text back as a NEW latest version (no model call); the pipeline's definition version does not change. If that text is already the live script, nothing is written and the response carries noop: true. Refused when the pipeline's instruction or source schema no longer matches the version (HTTP 422 with the reason; nothing is changed), and refused with HTTP 409 when a repository-backed script file was edited since its recorded commit. Only call this when the operator has explicitly asked to restore this specific script version. Report the new version and stop. If this Datris instance's agent policy requires a person to approve this action, the call does NOT perform it: it returns status pending_approval with an approvalId. Tell the user it is waiting for approval in Datris, then poll get_approval with that id (pause with wait_seconds between polls) — do not re-issue the action.

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

Input Schema

NameRequiredDescriptionDefault
kindYesWhich script: the AI data-quality rule or the AI transformation
nameYesName of the pipeline
reasonNoOptional one-line reason for this change, recorded in the platform's audit log and shown to anyone asked to approve it.
versionYesScript version to restore (becomes a new latest version)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.6/5.0
Behavior5/5

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

With no annotations supplied, the description carries the full burden and does so thoroughly: append-only mutation that writes a NEW latest version, no model call, pipeline definition version unchanged, noop:true when the text is already live, and nothing changed on refusal. It also discloses the pending_approval status, the approvalId field, and the required get_approval polling with wait_seconds.

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?

Front-loaded with the core action and the append-only/side-effecting warning, then failure modes, then the approval protocol in call order. It is dense but long; a few clauses (e.g. restating that the definition version does not change alongside the append-only framing) could be tightened.

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?

Complete for a side-effecting restore with no annotations and no output schema: the description covers mutation semantics, idempotent noop behavior, both refusal codes with their causes, and the full approval-handling protocol including which follow-up tool to poll. Nothing needed to invoke it correctly is missing.

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%, so name, kind, reason, and version are already documented in the schema. The description reinforces that `version` becomes a new latest version and that the change is recorded in the audit log, but adds little beyond what the schema fields already say. Baseline 3 applies when the schema does the heavy lifting.

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?

Names a specific verb and resource: make an earlier version of a pipeline's AI data-quality rule or AI transformation script the one the pipeline runs. The wording distinguishes it from the similarly named restore_pipeline_version and restore_tap_version siblings by making clear it restores script text rather than a pipeline or tap definition.

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?

Gives an explicit precondition (only when the operator has explicitly asked to restore this specific script version), explicit stop instruction (report the new version and stop), and explicit failure contexts (422 on schema/instruction mismatch, 409 on edited repository-backed file). It also states the approval-policy branch and tells the agent not to re-issue the action.

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

Deploy Server

Other Tools