Skip to main content
Glama

daemonset_update

Update container images in Kubernetes DaemonSets across clusters. Specify context, namespace, name, and new image to modify deployments.

Instructions

Update an existing DaemonSet in the specified namespace.

Args: context_name: The Kubernetes context name namespace: The Kubernetes namespace name: The DaemonSet name image: The new container image to update

Returns: Status of the update operation

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
context_nameYes
namespaceYes
nameYes
imageYes

Implementation Reference

  • The daemonset_update tool handler: reads the existing DaemonSet, updates the first container's image, and replaces it using Kubernetes API.
    @mcp.tool()
    @use_current_context
    @check_readonly_permission
    def daemonset_update(context_name: str, namespace: str, name: str, image: str):
        """
        Update an existing DaemonSet in the specified namespace.
    
        Args:
            context_name: The Kubernetes context name
            namespace: The Kubernetes namespace
            name: The DaemonSet name
            image: The new container image to update
    
        Returns:
            Status of the update operation
        """
        apps_v1: AppsV1Api = get_api_clients(context_name)["apps"]
        daemonset = apps_v1.read_namespaced_daemon_set(name=name, namespace=namespace)
        daemonset.spec.template.spec.containers[0].image = image
        updated_daemonset = apps_v1.replace_namespaced_daemon_set(name=name, namespace=namespace, body=daemonset)
        return {"name": updated_daemonset.metadata.name, "status": "Updated"}
Behavior2/5

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

With no annotations provided, the description carries full burden but offers minimal behavioral insight. It mentions the tool updates an existing DaemonSet and returns status, but lacks details on permissions required, whether it's destructive (e.g., triggers pod restarts), error handling, or rate limits. For a mutation tool with zero annotation coverage, this is insufficient.

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?

The description is well-structured with a clear purpose statement followed by Args and Returns sections. It's front-loaded and avoids unnecessary fluff. However, the 'Returns' line is vague ('Status of the update operation') and could be more informative, slightly reducing efficiency.

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?

For a mutation tool with 4 parameters, 0% schema coverage, no annotations, and no output schema, the description is incomplete. It covers the basic purpose and parameters but lacks critical context like behavioral traits (e.g., side effects), error scenarios, or output details, leaving significant gaps for safe and effective use.

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 0%, so the description must compensate. It lists all four parameters with brief explanations (e.g., 'The new container image to update'), adding meaning beyond the schema's titles. However, it doesn't clarify parameter formats (e.g., image tag syntax) or interactions, providing basic but incomplete semantic context.

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 ('Update') and resource ('an existing DaemonSet'), specifying it's for an existing resource in a namespace. It distinguishes from siblings like 'daemonset_create' and 'daemonset_delete' by focusing on updates, though it doesn't explicitly contrast with 'daemonset_get' or 'daemonset_list'.

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?

No guidance is provided on when to use this tool versus alternatives. It doesn't mention prerequisites (e.g., DaemonSet must exist), compare to sibling tools like 'daemonset_create' for new resources, or specify use cases (e.g., rolling updates vs. other methods). The description only states what it does, not when to apply it.

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/bourbonkk/k8s-pilot'

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