Skip to main content
Glama

create-backup

Back up Kubernetes cluster resources to a specified file, optionally filtering by namespace to protect configurations and data.

Instructions

Create a backup of cluster resources

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
namespaceNoThe namespace to backup (optional, backs up all namespaces if not specified)
outputNoOutput file path for the backup

Implementation Reference

  • The handler logic for the 'create-backup' tool. It executes a kubectl command to get all resources (in specified namespace or all) in YAML format and saves to the provided output file path (defaults to 'backup.yaml'). Returns success message or stdout.
      const { namespace, output = "backup.yaml" } = args || {};
      const nsArg = namespace ? `-n ${namespace}` : "--all-namespaces";
      const cmd = `kubectl get all ${nsArg} -o yaml > ${output}`;
      const { stdout } = await execAsync(cmd);
      return {
        content: [{ type: "text", text: stdout || `Backup created in ${output}` }]
      };
    }
  • server.js:1373-1388 (registration)
    Tool registration in the tools list returned by ListToolsRequestHandler, including name, description, and inputSchema.
      name: "create-backup",
      description: "Create a backup of cluster resources",
      inputSchema: {
        type: "object",
        properties: {
          namespace: { 
            type: "string",
            description: "The namespace to backup (optional, backs up all namespaces if not specified)"
          },
          output: { 
            type: "string",
            description: "Output file path for the backup"
          }
        }
      }
    }
  • Input schema definition for the 'create-backup' tool, defining optional namespace and output file path parameters.
      type: "object",
      properties: {
        namespace: { 
          type: "string",
          description: "The namespace to backup (optional, backs up all namespaces if not specified)"
        },
        output: { 
          type: "string",
          description: "Output file path for the backup"
        }
      }
    }
Behavior2/5

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

With no annotations provided, the description carries full burden for behavioral disclosure. 'Create a backup' implies a write operation that likely requires specific permissions and may have side effects, but the description doesn't mention authentication needs, whether the operation is reversible, potential impacts on cluster performance during backup, or what happens if the output file already exists. It provides minimal behavioral context beyond the basic action.

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 description is a single, efficient sentence with zero wasted words. It's appropriately sized for a tool with two well-documented parameters and gets straight to the point without unnecessary elaboration.

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

Completeness3/5

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

For a write operation with no annotations and no output schema, the description is minimally adequate but has clear gaps. It states what the tool does but doesn't cover important contextual aspects like what 'cluster resources' specifically includes, whether the backup is incremental or full, expected runtime, or what format the backup file will be in. The 100% schema coverage helps, but more behavioral context would be valuable.

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?

Schema description coverage is 100%, so the schema already fully documents both parameters (namespace and output). The description doesn't add any parameter-specific information beyond what's in the schema, such as format examples for the output path or namespace naming conventions. Baseline 3 is appropriate when the schema does the heavy lifting.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('create') and resource ('backup of cluster resources'), providing a specific purpose. However, it doesn't differentiate this backup creation tool from potential sibling tools that might also involve backup operations (none are listed among siblings, but the description doesn't explicitly address this).

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites, timing considerations, or compare it to other backup-related operations that might exist in the broader system context.

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/thekaranpargaie/kube-mcp'

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