Skip to main content
Glama

set_deployment_image

Destructive

Update a Kubernetes deployment container's image and return the previous image for rollback. Use dry_run to preview changes without applying them.

Instructions

[WRITE][risk=medium] Update a deployment container's image. Inverse: restore previous.

Returns previous_image so the change can be undone. Pass dry_run=True to preview without changing anything (no undo is recorded for a preview).

Args: name: Deployment name. container: Container name within the pod template (see deployment_get). image: New image reference (e.g. "nginx:1.27"). namespace: Namespace; omit for the target's default namespace. dry_run: If True, preview without updating the image. target: k8s target name from config.

Input Schema

NameRequiredDescriptionDefault
nameYes
imageYes
targetNo
dry_runNo
containerYes
namespaceNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.8.0

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already declare the destructive and non-idempotent profile, but the description adds genuine value beyond them: it discloses that the return includes previous_image enabling undo, that dry_run previews without mutation, and that no undo record is created for a preview. These are meaningful behavioral traits not captured by the annotations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loads the operation type and risk tag, then behavior, then a clean Args list. Well organized with little waste, though the [WRITE][risk=medium] prefix slightly duplicates what the annotations already convey.

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

Completeness4/5

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

For a mutation tool with no output schema, the description supplies the key return contract (previous_image) and safety behavior (dry_run, no undo on preview). Combined with annotations covering the safety profile, an agent has enough to invoke it correctly; only the precise rollback mechanism is left implicit.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must carry the load, and it documents all six parameters in the Args block with useful detail: image format example ('nginx:1.27'), container scoping within the pod template, namespace defaulting, and target origin from config. It doesn't clarify the interaction between name/namespace/target beyond defaults, but coverage is substantially better than the empty schema.

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

Purpose5/5

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

States a specific verb and resource ('Update a deployment container's image') that clearly differentiates it from siblings like scale_deployment, rollout_restart_deployment, and rollout_undo_deployment. The [WRITE][risk=medium] tag scopes the operation type immediately.

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

Usage Guidelines3/5

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

The description implies usage via the 'Inverse: restore previous' framing and the dry_run preview path, and points to deployment_get for the container name. However, it never explicitly states when to prefer this tool over related mutation siblings such as rollout_restart_deployment or rollout_undo_deployment, leaving routing partly to inference.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.