Skip to main content
Glama

Cleanup Old Backups

cleanup_backups

Deletes older backup files, retaining a specified number of recent backups to reduce clutter and reclaim storage. Preview existing backups before deletion.

Instructions

Delete old backup files, keeping only the most recent N backups. Use list_backups to preview before cleanup.

Input Schema

NameRequiredDescriptionDefault
keep_countNoNumber of most recent backups to keep (default: 5). Anti-Hallucination Hint: You can pass a string or number, or use positional args: mj.backup.cleanupBackups(5).
use_test_dbNo

Output Schema

NameRequiredDescriptionDefault
codeNoError code (e.g. VALIDATION_ERROR, INTERNAL_ERROR)
errorNoHuman-readable error message
deletedNo
detailsNoAdditional error context
messageNo
successYes
categoryNoError category (validation, query, connection, internal)
keptCountNo
suggestionNoSuggested fix for the error
recoverableNoWhether the error is recoverable
deletedCountNo
aggregated_errorsNoDetails of individual errors in a multi-step operation

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv9.0.0

TDQS

A4.4/5.0
Behavior4/5

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

The description clarifies the 'N' mechanism, which is a key operational behavior of the tool. Although the `destructiveHint: false` annotation appears inconsistent with the 'delete' action, the description itself is clear about the action and the scope control.

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?

The definition is highly concise, utilizing only two sentences to convey purpose, mechanism, and prerequisite safety steps. No sentence is wasted.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

It is largely complete by defining the core logic and providing the necessary pre-flight check (list_backups). A small gap exists regarding error handling or the effect of 'use_test_db' outside of its schema description.

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?

It provides a clear definition of 'keep_count,' which is useful. However, with only 50% schema coverage, it fails to provide any context or explanation for the 'use_test_db' parameter, leaving that half of the tool's functionality poorly defined.

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 uses a specific action ('Delete') applied to a specific resource ('backup files') and defines the precise logic ('keeping only the most recent N backups'). This clearly distinguishes it from list_backups.

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 explicitly provides guidance on safe usage by advising the agent to call the sibling tool list_backups for a preview before execution.

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