Skip to main content
Glama
Datris MCP Server

Datris MCP Server

restore_catalog

Restore an exported catalog archive into a named catalog, either as a new catalog or by overwriting matching items with confirmation; no merge, and missing secrets are reported.

Instructions

Restore a catalog archive produced by export_catalog as catalog catalog (the same or a new name). Call this ONLY when the user has explicitly asked to restore and named the archive to use. A restore never merges: it is refused (with the clashing names) when the catalog already exists or any archived tap or pipeline name exists anywhere on this install. mode=overwrite replaces only items already in catalog and needs confirm equal to the catalog name. It never writes secrets: missing ones come back under missingSecrets for the user to create. Restored taps are left disabled; tell the user to test and enable them. Items that could not be restored come back under failed; report them. Archived AI scripts are restored as-is unless regenerate_scripts is set; scriptsImported, scriptsRegenerated and scriptsKept (a live script left in place; both with the reason) say which were which. The response carries sourceEnvironment (where the archive was exported) and targetEnvironment (this install), plus a warning when they differ; tell the user. 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": {
      "catalog": "<catalog>",
      "archive_base64": "<archive_base64>"
    },
    "name": "restore_catalog"
  }
}

Input Schema

NameRequiredDescriptionDefault
modeNonew (default): the catalog and every archived name must not exist yet. overwrite: replace items already in this catalog; needs confirm.
reasonNoOptional one-line reason for this change, recorded in the platform's audit log and shown to anyone asked to approve it.
catalogYesCatalog name to restore into (letters, digits, '_' and '-').
confirmNoRequired for mode=overwrite: the catalog name, repeated.
restore_stateNoOptional, default true. false skips each tap's incremental state (for a copy that should start from scratch).
archive_base64YesThe archive as base64 (the `archiveBase64` value export_catalog returned).
regenerate_scriptsNoOptional, default false. true regenerates each pipeline's AI scripts on this install instead of restoring the archived ones.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.6/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and mostly meets it: no-merge semantics, the refusal condition (clashing tap/pipeline names anywhere on the install), that secrets are never written, that restored taps come back disabled, failure reporting via `failed`, and environment-mismatch warnings. It stops short of stating required permissions or whether a refused restore is retryable, so it is strong but not exhaustive.

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 hard prerequisite, and every sentence carries operational detail. It is a single dense paragraph, however, bundling response-field narration, approval flow, and failure handling together, which makes it harder to scan than a short bulleted structure would.

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?

Despite having no output schema and seven parameters, the description documents the meaningful response fields (`failed`, `missingSecrets`, `scriptsImported`/`scriptsRegenerated`/`scriptsKept`, `sourceEnvironment`/`targetEnvironment`, `pending_approval`/`approvalId`). An agent can complete the task, including the human handoff for disabled taps and missing secrets, without further information.

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 a 3 is the floor, but the description adds genuine meaning: what mode=overwrite does (replaces only items already in `catalog`) and why `confirm` must equal the catalog name, plus the effect of `regenerate_scripts` on archived AI scripts. It does not elaborate on `restore_state` or `reason`, which the schema already covers adequately.

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 and resource ('Restore a catalog archive produced by export_catalog') and names the producing sibling, so the agent can pair it with export_catalog without opening either schema. The parenthetical '(the same or a new name)' disambiguates the target-name semantics.

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 gate: 'Call this ONLY when the user has explicitly asked to restore and named the archive to use.' It also routes the approval case to `get_approval` with `wait_seconds` and explicitly forbids re-issuing the action, which is exactly the when/when-not guidance an agent needs.

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