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 };
    });
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. It states 'Get the data' but doesn't disclose behavioral traits like authentication requirements, rate limits, error conditions (e.g., if configmap doesn't exist), output format (e.g., YAML/JSON, raw data), or whether it's read-only (implied but not explicit). The description is minimal and lacks operational context.

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 a single, direct sentence with no wasted words, making it highly concise. However, it's front-loaded but under-specified—it could benefit from slightly more detail without losing efficiency, as it currently lacks context that might be needed for clarity.

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?

Given no annotations and no output schema, the description is incomplete for a tool that likely returns structured data (configmap contents). It doesn't explain what 'data' includes (e.g., key-value pairs, metadata), potential errors, or usage context in Kubernetes. For a read operation with 2 parameters, more guidance is needed to be fully helpful.

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 100%, with clear descriptions for both parameters in the schema. The description adds no additional meaning beyond the schema (e.g., it doesn't explain what a configmap is, format of returned data, or interactions between parameters). Baseline is 3 since the schema adequately documents parameters.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose3/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description 'Get the data from a configmap' clearly states the action (get) and resource (configmap), but it's vague about what 'data' specifically means (e.g., full configmap object, specific keys, metadata). It distinguishes from siblings like 'list-configmaps' (which lists multiple) and 'describe-configmap' (which provides detailed description), but doesn't explicitly differentiate from 'get-secret' or other get tools.

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?

No guidance is provided on when to use this tool versus alternatives like 'describe-configmap' (for detailed info) or 'list-configmaps' (for listing multiple). The description implies it retrieves data, but doesn't specify use cases, prerequisites, or exclusions (e.g., vs. reading from a file or other sources).

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/thekaranpargaie/kube-mcp'

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