Skip to main content
Glama

get-configmap

Retrieve configuration data from a Kubernetes ConfigMap to access application settings and environment variables stored in the cluster.

Instructions

Get the data from a configmap

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
configmapYesThe name of the configmap
namespaceNoThe namespace of the configmap (optional, defaults to current context namespace)

Implementation Reference

  • Handler implementation for the 'get-configmap' tool. Executes kubectl get configmap with -o yaml to retrieve the full configmap data including all keys and values.
    case "get-configmap": { const { configmap, namespace } = args; const nsArg = namespace ? `-n ${namespace}` : ""; const cmd = `kubectl get configmap ${configmap} ${nsArg} -o yaml`; const { stdout } = await execAsync(cmd); return { content: [{ type: "text", text: stdout || "No configmap data found" }] }; }
  • Input schema definition for the 'get-configmap' tool, defining required 'configmap' name and optional 'namespace' parameter.
    name: "get-configmap", description: "Get the data from a configmap", inputSchema: { type: "object", properties: { configmap: { type: "string", description: "The name of the configmap" }, namespace: { type: "string", description: "The namespace of the configmap (optional, defaults to current context namespace)" } }, required: ["configmap"] } },
  • server.js:1392-1394 (registration)
    Registration handler for listing all available tools, including 'get-configmap' via the 'tools' array.
    server.setRequestHandler(ListToolsRequestSchema, async () => { return { 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/thekaranpargaie/kube-mcp'

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