Skip to main content
Glama

Restore a backup from a file

amber_upload_backup
Idempotent

Opens a drag-and-drop panel to restore a backup stored on the user's computer, uploading the selected file directly to storage without passing through the chat.

Instructions

Show the user a drag-and-drop panel for restoring a backup that is on THEIR COMPUTER. Call this with no arguments when someone wants to restore and the file is local -- they pick it, and it uploads straight to storage without passing through this conversation.

IF THE BACKUP IS ALREADY ONLINE (S3, R2, Backblaze, a presigned link) use amber_import_memories with the URL instead; that needs no upload at all and is the better path.

The prepare and finish actions are driven BY THE PANEL, not by you. Call this with no arguments and let the person use it; then poll amber_get_import_status for progress.

IF YOUR CLIENT CANNOT RENDER PANELS, tell them to open https://ambermem.com/restore instead. It is the same uploader as an ordinary web page, and it needs a key from amber_create_backup_key. Requires an active subscription.

Errors: invalid_params (finish called without a task_id), not_found (no upload with that id, or it belongs to another account), nothing_uploaded (finish called but nothing arrived at the upload link), invalid_archive (via amber_get_import_status, not from this call: what was uploaded is not a readable Amber backup; that task is marked failed, so start a new one), not_startable (the upload is no longer in a state that can begin, for example it already ran or already failed; ask for a fresh link and send the file again, which duplicates nothing because memories keep their ids).

Input Schema

NameRequiredDescriptionDefault
actionNoLeave this out. The upload panel sets it; calling it yourself does nothing a user can see.
task_idNoSet by the panel on `finish`.

Output Schema

NameRequiredDescriptionDefault
statusYes`panel` means the upload panel was shown and the person drives it from here.
task_idNoPresent once an upload has been prepared.
upload_urlNoFor the panel only. Do not show this to the user.
restore_urlNoA link the user opens to upload their backup file. Needs no backup key. Relay it verbatim.
expires_in_secondsNoHow long the upload link stays valid. The signature is checked when the request STARTS, so an upload may run longer than this.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv1.1.6

TDQS

A4.4/5.0
Behavior3/5

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

The annotations already declare idempotentHint=true and destructiveHint=false, and the description usefully corroborates the idempotency claim by explaining that re-uploading duplicates nothing because memories keep their ids. It also adds the subscription prerequisite and panel-driven action semantics that annotations cannot express. However, the dry-run-ish description of what the panel does versus what the tool does is somewhat repetitive, and the error catalogue, while helpful, partly duplicates what the schema-adjacent contract already implies. Strong added context net of annotations, but not fully leveraged.

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 front-loaded with the primary action and alternative, then the panel-driving caveat, then fallback and errors, which is a sensible ordering. It is dense but nearly every sentence carries actionable information; the parenthetical error glossary is the only section that runs long relative to its value.

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?

An output schema exists so return values need not be described, and the description still covers the gaps that matter: subscription requirement, key prerequisite for the web fallback, panel-vs-agent division of labor, and a full error taxonomy including which errors originate from a different tool. An agent has everything needed to act or to hand off.

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% and both parameter descriptions already say the panel sets them, so the baseline is 3. The description adds the rationale an agent needs to resist orchestrating the call itself ('the `prepare` and `finish` actions are driven BY THE PANEL, not by you'), which is meaningfully more than the schema conveys.

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 and resource: it shows a drag-and-drop panel that restores a backup located on the user's own computer. It explicitly separates this from the sibling `amber_import_memories`, which handles already-online archives, so an agent can pick the right tool without inspecting either schema.

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?

It states the condition for use (file is local), the exclusion with a named alternative (online backup → `amber_import_memories` with URL), the no-argument invocation pattern, and a third path for clients that cannot render panels (open the web uploader). It also routes follow-up progress checks to `amber_get_import_status`, leaving nothing to inference.

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