Skip to main content
Glama

configmap_update

Update existing ConfigMaps in Kubernetes namespaces to modify configuration data for applications and services.

Instructions

Update an existing ConfigMap in the specified namespace.

Args: context_name: The Kubernetes context name namespace: The Kubernetes namespace name: The ConfigMap name data: The new data to update in the ConfigMap

Returns: Status of the update operation

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
context_nameYes
namespaceYes
nameYes
dataYes

Implementation Reference

  • The core handler implementation for the 'configmap_update' tool. It reads the existing ConfigMap, updates its data, and replaces it using the Kubernetes CoreV1Api. Decorated with @mcp.tool() for registration and other utilities.
    @mcp.tool()
    @use_current_context
    @check_readonly_permission
    def configmap_update(context_name: str, namespace: str, name: str, data: dict):
        """
        Update an existing ConfigMap in the specified namespace.
    
        Args:
            context_name: The Kubernetes context name
            namespace: The Kubernetes namespace
            name: The ConfigMap name
            data: The new data to update in the ConfigMap
    
        Returns:
            Status of the update operation
        """
        core_v1: CoreV1Api = get_api_clients(context_name)["core"]
        configmap = core_v1.read_namespaced_config_map(name=name, namespace=namespace)
        configmap.data = data
        updated_configmap = core_v1.replace_namespaced_config_map(name=name, namespace=namespace, body=configmap)
        return {"name": updated_configmap.metadata.name, "status": "Updated"}
  • The @mcp.tool() decorator registers the configmap_update function as an MCP tool.
    @mcp.tool()
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. While 'Update' implies a mutation operation, the description fails to disclose critical behavioral traits: what permissions are required, whether the update is atomic or merges with existing data, what happens if the ConfigMap doesn't exist, error conditions, or rate limits. The return value description ('Status of the update operation') is vague and unhelpful.

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 clear sections (purpose, Args, Returns) and uses minimal words to convey essential information. The opening sentence directly states the tool's purpose, and parameter descriptions are terse but informative. No redundant or unnecessary information is present.

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 lacks crucial context about behavioral implications (permissions, error handling, idempotency), doesn't explain the return format despite mentioning it, and provides no guidance on usage relative to sibling tools. The parameter documentation helps but doesn't compensate for missing behavioral transparency.

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?

With 0% schema description coverage, the description adds significant value by documenting all 4 parameters in the Args section, explaining what each parameter represents. It clarifies that 'data' contains 'The new data to update in the ConfigMap,' which provides semantic meaning beyond the schema's generic object type. However, it doesn't specify format expectations for 'data' or provide examples.

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 ConfigMap in the specified namespace'), making the purpose immediately understandable. It distinguishes from sibling tools like configmap_create, configmap_delete, configmap_get, and configmap_list by specifying it's for updating existing ConfigMaps. However, it doesn't explicitly differentiate from other update tools like daemonset_update or deployment_update beyond the resource type.

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., ConfigMap must exist), when not to use it, or how it differs from similar update operations on other resources. With many sibling tools including configmap_create and configmap_delete, the lack of comparative context leaves the agent without usage direction.

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