Skip to main content
Glama

get-secret

Retrieve sensitive data from Kubernetes secrets to access configuration values, API keys, or credentials stored securely within your cluster.

Instructions

Get the data from a secret

Input Schema

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

Implementation Reference

  • The handler function for the 'get-secret' tool. It destructures the arguments to get the secret name and optional namespace, constructs a kubectl command to fetch the secret as YAML, executes it using execAsync, and returns the stdout content or a fallback message.
    case "get-secret": {
      const { secret, namespace } = args;
      const nsArg = namespace ? `-n ${namespace}` : "";
      const cmd = `kubectl get secret ${secret} ${nsArg} -o yaml`;
      const { stdout } = await execAsync(cmd);
      return {
        content: [{ type: "text", text: stdout || "No secret data found" }]
      };
    }
  • The schema definition for the 'get-secret' tool, including name, description, and input schema specifying the required 'secret' parameter and optional 'namespace'.
    {
      name: "get-secret",
      description: "Get the data from a secret",
      inputSchema: {
        type: "object",
        properties: {
          secret: { 
            type: "string",
            description: "The name of the secret"
          },
          namespace: { 
            type: "string",
            description: "The namespace of the secret (optional, defaults to current context namespace)"
          }
        },
        required: ["secret"]
      }
    },
  • server.js:1392-1394 (registration)
    The tool list registration handler that returns the 'tools' array, which includes the 'get-secret' tool definition, making it discoverable via the MCP listTools request.
    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 mentions 'Get the data' but doesn't disclose behavioral traits such as read-only vs. destructive nature, authentication requirements, rate limits, or output format. This is inadequate for a tool that likely accesses sensitive secrets.

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, efficient sentence with no wasted words. It's appropriately sized for a simple tool, though it could be more informative. No structural issues are present.

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. It doesn't explain what 'data' includes (e.g., key-value pairs, metadata), potential errors, or security implications. For a secret-access tool, this leaves significant gaps in understanding.

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%, so the schema already documents parameters 'secret' and 'namespace'. The description adds no meaning beyond this, as it doesn't explain parameter semantics, constraints, or examples. Baseline 3 is appropriate when schema does the heavy lifting.

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 secret' states a clear verb ('Get') and resource ('secret'), but it's vague about what 'data' means (e.g., metadata, values, or full content). It doesn't distinguish from sibling tools like 'describe-secret' or 'list-secrets', leaving ambiguity about its specific function.

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-secret' or 'list-secrets'. The description lacks context about use cases, prerequisites, or exclusions, leaving the agent to infer usage from the name alone.

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