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
| Name | Required | Description | Default |
|---|---|---|---|
| context_name | Yes | ||
| namespace | Yes |
Implementation Reference
- tools/configmap.py:8-24 (handler)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