Skip to main content
Glama

configmap_list

List all ConfigMaps in a specified Kubernetes namespace to view configuration data and manage application settings across clusters.

Instructions

List all ConfigMaps in a given namespace.

Args: context_name: The Kubernetes context name namespace: The Kubernetes namespace

Returns: List of ConfigMap basic information

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
context_nameYes
namespaceYes

Implementation Reference

  • The handler function decorated with @mcp.tool(), implementing the logic to list ConfigMaps in a specified namespace using the Kubernetes CoreV1Api.
    @mcp.tool()
    @use_current_context
    def configmap_list(context_name: str, namespace: str):
        """
        List all ConfigMaps in a given namespace.
    
        Args:
            context_name: The Kubernetes context name
            namespace: The Kubernetes namespace
    
        Returns:
            List of ConfigMap basic information
        """
        core_v1: CoreV1Api = get_api_clients(context_name)["core"]
        configmaps = core_v1.list_namespaced_config_map(namespace)
        result = [{"name": cm.metadata.name} for cm in configmaps.items]
        return result
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 only states it's a list operation. It doesn't disclose behavioral traits like whether it requires specific permissions, how it handles errors, if results are paginated, or what 'basic information' includes. This leaves significant gaps for a Kubernetes tool.

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 efficiently structured with a clear purpose statement followed by Args and Returns sections. Every sentence earns its place with no redundant information, making it easy to scan and understand quickly.

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 simple list tool with 2 parameters and no output schema, the description covers the basics but lacks context about Kubernetes-specific behaviors (e.g., cluster context switching, namespace existence checks). With no annotations and minimal output explanation ('basic information' is vague), it's adequate but has clear gaps.

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 documents both parameters in the Args section with brief explanations, adding meaning beyond the bare schema. However, it doesn't provide format examples, constraints, or default values, keeping it at a baseline level.

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 verb ('List') and resource ('ConfigMaps') with scope ('in a given namespace'), making the purpose unambiguous. However, it doesn't explicitly differentiate from sibling tools like 'configmap_get' or 'pod_list', which would require more specific scope or output details for a perfect score.

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 like 'configmap_get' (for single ConfigMap details) or 'list_namespace_resources' (for broader resource listing). It mentions the namespace parameter but doesn't explain usage context or prerequisites.

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