Skip to main content
Glama

gepa_list_backups

Retrieve and manage system backups with optional filters, ensuring accessible and organized data for the Prompt Auto-Optimizer MCP server. Use limit and label filters to streamline backup selection.

Instructions

List available system backups

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
filterLabelNoFilter backups by label (optional)
limitNoMaximum number of backups to return

Implementation Reference

  • The core handler function for 'gepa_list_backups' tool. It initializes disaster recovery, simulates listing backups with mock data filtered by limit and label, formats a markdown response listing available backups with details like ID, timestamp, size, etc.
    private async listBackups(params: { limit?: number; filterLabel?: string; }): Promise<{ content: { type: string; text: string; }[] }> { const { limit = 20, filterLabel } = params; try { await this.disasterRecovery.initialize(); // This would ideally be a method on the disaster recovery system // For now, we'll simulate the response const mockBackups = [ { id: 'backup_1733140800_abc123', timestamp: new Date(), label: 'manual-backup', type: 'full', size: 5242880, components: 3 }, { id: 'backup_1733137200_def456', timestamp: new Date(Date.now() - 3600000), label: 'auto-backup', type: 'incremental', size: 1048576, components: 2 } ]; let backups = mockBackups; if (filterLabel) { backups = backups.filter(b => b.label?.includes(filterLabel)); } backups = backups.slice(0, limit); return { content: [ { type: 'text', text: `# Available System Backups Found ${backups.length} backup(s): ${backups.map(backup => `## ${backup.label || 'Unlabeled'} (${backup.id}) - **Created**: ${backup.timestamp.toISOString()} - **Type**: ${backup.type} - **Size**: ${(backup.size / 1024 / 1024).toFixed(2)} MB - **Components**: ${backup.components} `).join('\n')} ${backups.length === 0 ? 'No backups found matching the criteria.' : `Use \`gepa_restore_backup\` with a backup ID to restore the system.`}`, }, ], }; } catch (error) { throw new Error(`Failed to list backups: ${error instanceof Error ? error.message : 'Unknown error'}`); } }
  • Tool registration in the TOOLS array, including the tool name 'gepa_list_backups', description, and inputSchema defining parameters limit (default 20) and optional filterLabel.
    name: 'gepa_list_backups', description: 'List available system backups', inputSchema: { type: 'object', properties: { limit: { type: 'number', default: 20, description: 'Maximum number of backups to return' }, filterLabel: { type: 'string', description: 'Filter backups by label (optional)' } } } },
  • Handler dispatch in the main tool request switch statement, mapping tool calls to the listBackups method with typed arguments.
    case 'gepa_list_backups': return await this.listBackups(args as { limit?: number; filterLabel?: string; });
  • Input schema/JSON Schema definition for the gepa_list_backups tool parameters.
    inputSchema: { type: 'object', properties: { limit: { type: 'number', default: 20, description: 'Maximum number of backups to return' }, filterLabel: { type: 'string', description: 'Filter backups by label (optional)' } }

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/sloth-wq/prompt-auto-optimizer-mcp'

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