Skip to main content
Glama

configmap_get

Retrieve detailed information about a specific Kubernetes ConfigMap, including its data and metadata, from a specified namespace and cluster context.

Instructions

Get details of a specific ConfigMap.

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

Returns: Detailed information about the ConfigMap

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
context_nameYes
namespaceYes
nameYes

Implementation Reference

  • The main handler function for the 'configmap_get' tool, decorated with @mcp.tool() for registration and @use_current_context. It retrieves a specific ConfigMap from the Kubernetes cluster using the CoreV1Api and returns its name and data.
    @mcp.tool() @use_current_context def configmap_get(context_name: str, namespace: str, name: str): """ Get details of a specific ConfigMap. Args: context_name: The Kubernetes context name namespace: The Kubernetes namespace name: The ConfigMap name Returns: Detailed information about the ConfigMap """ core_v1: CoreV1Api = get_api_clients(context_name)["core"] configmap = core_v1.read_namespaced_config_map(name=name, namespace=namespace) return {"name": configmap.metadata.name, "data": configmap.data}

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