Skip to main content
Glama

list_backup_jobs

Retrieve recent AWS backup jobs with optional filtering by state and time window to monitor backup operations and identify issues.

Instructions

Lists recent backup jobs, optionally filtering by state (default: FAILED).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
stateNoFilter by job state (e.g., COMPLETED, FAILED, RUNNING). Default: FAILED.
hoursNoLook back window in hours (default: 24).

Implementation Reference

  • Executes the list_backup_jobs tool by calling AWS BackupClient.ListBackupJobsCommand with optional filters for state and time window, formats and returns the job list.
    if (name === "list_backup_jobs") { const state = (args as any)?.state || "FAILED"; const hours = (args as any)?.hours || 24; const sinceDate = new Date(Date.now() - hours * 60 * 60 * 1000); const command = new ListBackupJobsCommand({ ByState: state, ByCreatedAfter: sinceDate }); const response = await backupClient.send(command); const jobs = response.BackupJobs?.map(j => ({ BackupJobId: j.BackupJobId, State: j.State, CreationDate: j.CreationDate, BackupVaultName: j.BackupVaultName, ResourceArn: j.ResourceArn, StatusMessage: j.StatusMessage })) || []; return { content: [{ type: "text", text: JSON.stringify(jobs, null, 2) }] }; }
  • Input schema definition for the list_backup_jobs tool, including optional state and hours parameters.
    { name: "list_backup_jobs", description: "Lists recent backup jobs, optionally filtering by state (default: FAILED).", inputSchema: { type: "object", properties: { state: { type: "string", description: "Filter by job state (e.g., COMPLETED, FAILED, RUNNING). Default: FAILED." }, hours: { type: "number", description: "Look back window in hours (default: 24)." } } } },
  • src/index.ts:400-416 (registration)
    Tool registration in the ListTools response, defining name, description, and input schema.
    { name: "list_backup_jobs", description: "Lists recent backup jobs, optionally filtering by state (default: FAILED).", inputSchema: { type: "object", properties: { state: { type: "string", description: "Filter by job state (e.g., COMPLETED, FAILED, RUNNING). Default: FAILED." }, hours: { type: "number", description: "Look back window in hours (default: 24)." } } } },
  • Initialization of the AWS BackupClient used by the list_backup_jobs handler.
    const backupClient = new BackupClient({});
  • Import of BackupClient and ListBackupJobsCommand required for the tool implementation.
    import { BackupClient, ListBackupJobsCommand } from "@aws-sdk/client-backup";

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/Bhavesh8890/MCP-server'

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