Skip to main content
Glama

Restore custom dashboard version

restore_custom_dashboard_version
Destructive

Restore Document

When to use: 사용자가 커스텀 대시보드 문서를 이전 버전으로 되돌려 달라고 할 때 — 예: 잘못 고친 리포트·차트를 수정 전 상태로 돌린다. 웹 「버전 기록」의 복원과 같다.

When NOT to use: 삭제한 문서를 되살리는 데 쓰지 않는다 — 삭제한 문서 자체는 404 이고 직접 되살리는 API 가 없다. 정의 일부만 고치거나 이름만 바꾸려면 update_custom_dashboard. 사용자가 어느 버전으로 되돌릴지 확인하기 전에는 호출하지 않는다.

Limitations: 현재 문서의 정의(body)와 이름을 대상 버전의 스냅샷으로 덮어쓴다(병합하지 않는다). 단 이름은 스냅샷에 이름이 있을 때만 바꾸므로, 이름 없이 저장된 버전으로 되돌리면 현재 이름이 그대로 남는다. 문서의 version 이 1 오르고 수정자가 호출자가 된다. 각 버전 행의 스냅샷은 그 action 직후 상태(delete 행만 삭제 직전 상태)이므로, 잘못된 수정을 되돌리려면 그 수정 행이 아니라 바로 이전 행을 고른다(수정 행을 고르면 현재와 같은 내용에 version 만 오른다). 문서 생성은 기록되지 않아 생성 후 첫 수정 이전 상태로는 되돌릴 수 없다. body.target_audit_log_id 는 list_custom_dashboard_versions 에서 restorable=true 인 행의 id, body.expected_version 은 get_custom_dashboard 로 읽은 현재 version 이다. expected_version 은 생략할 수 없고, 현재 version 과 다르면 409(현재 상태 동봉)로 거부되며 아무것도 바뀌지 않는다. 리포트(REPORT)를 복원하면 하위 차트도 함께 바뀐다: 복원된 layouts 가 가리키는 차트 중 삭제된 것은 되살리고, 대상 시점 뒤에 고쳐진 차트는 그 시점의 정의로 되돌린다(차트마다 version +1, cascade_restore 기록). 하위 차트별 권한은 따로 확인하지 않는다. 복원도 새 버전(action=restore)으로 기록되므로, 잘못 복원했으면 버전 기록에서 복원 직전 버전을 골라 다시 복원해 되돌릴 수 있다. 단, 기록이 남지 않은 변경(일괄 수정, body 를 null 로 보낸 수정)은 이렇게 되돌릴 수 없다. 만료된 버전은 410, 손상된 버전은 500, 복원하면 이 문서를 쓰는 알림이 깨지는 경우 422. custom_dashboard:write 권한(editor 이상 공유 또는 소유자) 필요.

Examples:

  • Q: 이 대시보드를 지난번 버전으로 되돌려줘 params: {'path': {'document_id': '7bbf3504-0c36-42d3-a847-581e6d89ef98'}, 'body': {'target_audit_log_id': 812, 'expected_version': 5}}

Output shape: object: {id, name, type, body, version, updated_at, ...} — 복원 뒤 상태

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": {
      "document_id": "<document_id>",
      "project-id": "<project-id>",
      "target_audit_log_id": "<target_audit_log_id>",
      "expected_version": "<expected_version>"
    },
    "name": "restore_custom_dashboard_version"
  }
}

Input Schema

NameRequiredDescriptionDefault
project-idYes
document_idYes
expected_versionYes
target_audit_log_idYes

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.8/5.0
Behavior5/5

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

Annotations only say readOnly=false and destructive=true; the description goes far beyond by disclosing that the body and name are overwritten (not merged), that the name is only replaced when the snapshot carries one, that version increments and the caller becomes the modifier, and that restores are themselves recorded so they can be undone. It also covers concurrency semantics (expected_version required, 409 with current state and no mutation), cascade behavior on child charts for REPORT documents, permission checks being skipped for child charts, undo limits (bulk edits, null-body edits), and status codes 410/500/422 plus the required custom_dashboard:write scope — consistent with destructiveHint=true.

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 description is long but deliberately structured with labeled When to use / When NOT to use / Limitations / Examples / Output shape blocks, and the core action plus preconditions are front-loaded. Nearly every sentence adds distinct information (snapshot-row semantics, cascade restore, undo path), though the Limitations block is dense enough that a few clauses 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?

For a destructive, concurrency-guarded restore on a document with cascading child charts, the definition covers preconditions, what is overwritten, what happens to dependents, failure modes, and permissions. An output schema exists, yet the description still sketches the returned object, so nothing an agent needs to call it correctly is missing.

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 description coverage is 0%, so the description must carry the burden, and it does for the two non-obvious parameters: target_audit_log_id is defined as the id of a row with restorable=true from list_custom_dashboard_versions, and expected_version as the current version read via get_custom_dashboard, non-optional, with 409 on mismatch. document_id and project-id are only shown in the example (document_id) or never explained (project-id), leaving a small residual gap.

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 concrete verb+resource (restore a custom dashboard document to a prior version) and anchors it with a familiar analogy ('the same as 「Version history」 restore in the web UI'). It also explicitly separates itself from update_custom_dashboard (partial edits/renames) and from undeleting documents, so an agent can place it among the siblings without opening schemas.

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?

There are explicit 'When to use' and 'When NOT to use' sections with named alternatives (update_custom_dashboard for partial definition or name changes) and a stated reason deletion-recovery is out of scope (deleted docs return 404, no restore API). It even adds a procedural precondition — do not call until the user confirms which version to revert to — and explains which version row to pick.

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