Skip to main content
Glama
Platano78

Smart-AI-Bridge

by Platano78

backup_restore

Create, list, restore, and clean up file backups. Snapshot files before risky edits, restore previous versions, and enforce retention policies.

Instructions

Manage the timestamped backup files produced by modify_file and write_files_atomic. Four actions: create (manually snapshot a file before a risky native edit), list (enumerate known backups, optionally filtered to one file), restore (overwrite a file with a specific backup_id), cleanup (delete old backups per the policy in cleanup_options). The cleanup policy applies BOTH thresholds — a backup is deleted only when it exceeds max_age_days OR when its file already has more than max_count_per_file newer backups. Use dry_run to preview before applying. ⚠️ DESTRUCTIVE: restore overwrites the current file (the prior state is auto-snapshotted to <path>.pre_restore_<timestamp>, so the restore itself is reversible); cleanup permanently deletes backup files from disk. create and list are read-only. Returns: { success, action, ...action-specific fields }. create{backup_id, backup_path, original_path, size}. restore{backup_id, restored_to, pre_restore_backup}. list{file_path, backups:[{path, backup_id, size, created, metadata}]}. cleanup{dry_run, backups_deleted, deleted:[{path, reason:'age'|'count'}]}.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
actionYesRequired. Operation to perform on the backup store.
metadataNoOptional tags and description attached to a `create` snapshot for later identification via `list`.
backup_idNoIdentifier of the backup to restore (timestamp from `<path>.backup.<timestamp>`). Required for `restore`, ignored for other actions.
file_pathNoFor `create`: file to snapshot (required). For `list`: optional filter to one file. Ignored for `restore` (use backup_id) and `cleanup` (operates on the whole store).
cleanup_optionsNoPolicy controls for the `cleanup` action. Ignored by other actions.
Behavior5/5

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

With no annotations, the description carries full burden and excels: it explicitly warns that restore is destructive but reversible via pre_restore snapshot, cleanup permanently deletes files, and create/list are read-only. It also discloses the cleanup policy's both-thresholds condition and return field details.

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?

Though longer than typical descriptions, every sentence adds value. It is well-structured with action enumeration, a prominent destructive warning, and a return specification section, earning its length without waste.

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?

Given the tool's complexity—four actions, nested options, and no output schema—the description fully covers all aspects: action behavior, parameter roles, destructive outcomes, cleanup thresholds, and return shapes for each action. It is self-contained and complete.

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 baseline is 3, but the description adds substantial meaning beyond schema: it explains action-specific parameter application (e.g., file_path ignored for restore/cleanup, backup_id required for restore), clarifies cleanup_options semantics, and defines the return structure per action. This significantly enhances understanding.

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 clearly states the tool manages timestamped backup files produced by modify_file and write_files_atomic, and enumerates the four specific actions (create, list, restore, cleanup). This distinguishes it from sibling tools that create or modify files, using a specific verb+resource structure.

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?

Usage context is clear: it says create for manual snapshot before risky native edit, list to enumerate backups, restore to overwrite, and cleanup per policy. It also mentions dry_run preview. However, it doesn't explicitly name alternative tools for when not to use this one, though siblings like modify_file are referenced as the source of backups.

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

Install Server

Other Tools

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/Platano78/Smart-AI-Bridge'

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