Skip to main content
Glama

k8s_rollout_status

Monitor deployment rollout status in Kubernetes to verify successful updates and identify issues with pods or replicas.

Instructions

Check the rollout status of a deployment

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesDeployment name
namespaceNoKubernetes namespace (default: 'default')

Implementation Reference

  • Implementation of the k8s_rollout_status tool handler logic.
    export async function rolloutStatus(args: Record<string, unknown>): Promise<string> {
      const api = getAppsV1Api();
      const namespace = (args.namespace as string) || "default";
      const name = args.name as string;
    
      if (!name) throw new Error("Deployment name is required");
    
      const response = await api.readNamespacedDeployment(name, namespace);
      const dep = response.body;
    
      const desired = dep.spec?.replicas || 0;
      const updated = dep.status?.updatedReplicas || 0;
      const ready = dep.status?.readyReplicas || 0;
      const available = dep.status?.availableReplicas || 0;
      const generation = dep.metadata?.generation || 0;
      const observedGeneration = dep.status?.observedGeneration || 0;
    
      const lines: string[] = [
        `Rollout status for deployment '${name}' in '${namespace}':`,
        "",
        `  Desired:    ${desired}`,
        `  Updated:    ${updated}`,
        `  Ready:      ${ready}`,
        `  Available:  ${available}`,
        "",
      ];
    
      if (generation === observedGeneration && updated === desired && ready === desired) {
        lines.push("✅ Rollout completed successfully.");
      } else if (updated < desired) {
        lines.push(`⏳ Rollout in progress: ${updated}/${desired} replicas updated.`);
      } else if (ready < updated) {
        lines.push(`⏳ Waiting for rollout: ${ready}/${updated} updated replicas ready.`);
      } else {
        lines.push("⚠️ Rollout status unclear — check conditions.");
      }
    
      // Conditions
      const conditions = dep.status?.conditions || [];
      if (conditions.length > 0) {
        lines.push("", "Conditions:");
        for (const cond of conditions) {
          lines.push(`  ${cond.type}: ${cond.status} — ${cond.message || ""}`);
        }
      }
    
      return lines.join("\n");
    }
  • Definition and input schema for the k8s_rollout_status tool.
    {
      name: "k8s_rollout_status",
      description: "Check the rollout status of a deployment",
      inputSchema: {
        type: "object" as const,
        properties: {
          name: { type: "string", description: "Deployment name" },
          namespace: { type: "string", description: "Kubernetes namespace (default: 'default')" },
        },
        required: ["name"],
      },
    },
  • Registration of the k8s_rollout_status tool handler in the switch statement.
    case "k8s_rollout_status": return rolloutStatus(a);
Behavior2/5

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

No annotations are provided, so the description carries full burden for behavioral disclosure. It states the tool 'checks' status, implying a read-only operation, but doesn't clarify what 'rollout status' includes (e.g., progress percentages, error messages, timestamps), whether it's real-time or cached, or if there are rate limits or authentication requirements. For a tool with no annotations, this leaves significant behavioral gaps.

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 directly states the tool's purpose without redundancy. It's front-loaded and easy to parse, making it highly concise and well-structured for quick understanding.

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

Completeness2/5

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

Given the complexity of Kubernetes operations and lack of annotations or output schema, the description is incomplete. It doesn't explain what the tool returns (e.g., status details, success/failure indicators), behavioral aspects like error handling, or how it integrates with sibling tools (e.g., k8s_rollback_deployment). For a tool with no structured output documentation, this leaves the agent guessing about results and usage context.

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%, with both parameters ('name' and 'namespace') clearly documented in the schema. The description doesn't add any parameter-specific information beyond what's in the schema, such as examples or constraints. However, since the schema fully covers the parameters, the baseline score of 3 is appropriate—the description doesn't compensate but doesn't need to.

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 ('check') and resource ('rollout status of a deployment'), making the purpose immediately understandable. It distinguishes from siblings like k8s_get_deployments (which lists deployments) and k8s_rollback_deployment (which performs an action). However, it doesn't specify what 'rollout status' entails (e.g., progress, health, completion), leaving some ambiguity.

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 (e.g., needing a deployment to exist), differentiate from similar tools like k8s_get_deployments (which might show deployment details), or specify use cases (e.g., monitoring updates, troubleshooting). Without this context, the agent must infer usage from the tool name alone.

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/batu-sonmez/infraclaude'

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