Skip to main content
Glama

sitebay_backup_list_commits

Retrieve available backup commits for a WordPress site to enable point-in-time restoration. Specify the domain and number of entries to fetch.

Instructions

List available backup commits for point-in-time restore.

Args: fqdn: The site domain number_to_fetch: Number of backup entries to fetch (default: 1)

Returns: List of available backup commits

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
fqdnYes
number_to_fetchNo

Implementation Reference

  • The primary handler function for the sitebay_backup_list_commits MCP tool, registered via @mcp.tool decorator. It fetches backup commits from the SiteBay API client, formats a user-friendly list, and handles errors appropriately.
    @mcp.tool async def sitebay_backup_list_commits( ctx: Context, fqdn: str, number_to_fetch: int = 1 ) -> str: """ List available backup commits for point-in-time restore. Args: fqdn: The site domain number_to_fetch: Number of backup entries to fetch (default: 1) Returns: List of available backup commits """ try: await ctx.info(f"Fetching backup commits for {fqdn}") client = await initialize_client() commits = await client.get_backup_commits(fqdn, number_to_fetch) if not commits: return f"No backup commits found for {fqdn}." result = f"**Available Backup Commits for {fqdn}** ({len(commits)} entries):\n\n" for commit in commits: result += f"• **{commit.get('created_at', 'Unknown time')}**\n" result += f" - ID: {commit.get('id', 'Unknown')}\n" result += f" - Commit Hash: {commit.get('commit_hash', 'Unknown')}\n" result += f" - Tables Saved: {len(commit.get('tables_saved', []))} tables\n" result += f" - Status: {'Completed' if commit.get('finished_at') else 'In Progress'}\n" result += "\n" await ctx.info(f"Successfully retrieved backup commits for {fqdn}") return result except SiteBayError as e: await ctx.error(f"Error fetching backup commits: {str(e)}") return f"❌ Backup Error: {str(e)}" except Exception as e: await ctx.error(f"Unexpected backup error: {str(e)}") return f"❌ Unexpected error: {str(e)}"

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/sitebay/sitebay-mcp'

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