Skip to main content
Glama

secret_get

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

Instructions

Get details of a specific Secret.

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

Returns: Detailed information about the Secret

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
context_nameYes
namespaceYes
nameYes

Implementation Reference

  • Handler function for the 'secret_get' tool. Retrieves a Kubernetes Secret by name from the specified namespace and context, decodes its base64-encoded data, and returns the secret's name, type, and decoded data.
    @mcp.tool()
    @use_current_context
    def secret_get(context_name: str, namespace: str, name: str):
        """
        Get details of a specific Secret.
    
        Args:
            context_name: The Kubernetes context name
            namespace: The Kubernetes namespace
            name: The Secret name
    
        Returns:
            Detailed information about the Secret
        """
        core_v1: CoreV1Api = get_api_clients(context_name)["core"]
        secret = core_v1.read_namespaced_secret(name=name, namespace=namespace)
        decoded_data = {key: base64.b64decode(value).decode() for key, value in secret.data.items()}
        return {
            "name": secret.metadata.name,
            "type": secret.type,
            "data": decoded_data
        }
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden. It states it 'Get details' which implies a read-only operation, but doesn't disclose behavioral traits like whether it requires specific permissions, if it's safe to use, what happens on errors, or rate limits. The description lacks crucial context for a tool interacting with sensitive Kubernetes 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 appropriately sized and front-loaded: the first sentence states the purpose clearly. The Args and Returns sections are structured but could be more concise. Every sentence earns its place, though the 'Returns' section is vague ('Detailed information about the Secret').

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 the complexity (Kubernetes secrets tool with no annotations and no output schema), the description is incomplete. It doesn't explain what 'Detailed information' includes, doesn't cover error cases, permissions, or safety considerations. For a tool handling sensitive data, this leaves significant gaps for an AI agent.

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 0%, so the description must compensate. It lists the three parameters (context_name, namespace, name) with brief explanations, adding meaning beyond the bare schema. However, it doesn't provide format details, examples, or constraints (e.g., valid namespace formats), leaving gaps in parameter understanding.

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

Purpose4/5

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

The description clearly states the tool's purpose: 'Get details of a specific Secret' with a verb ('Get') and resource ('Secret'). It distinguishes from sibling tools like 'secret_list' (which lists multiple secrets) and 'secret_get' (which retrieves details of a specific one). However, it doesn't explicitly mention Kubernetes context, which is implied but could be more specific.

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. The description doesn't mention when to use 'secret_get' versus 'secret_list' (for listing all secrets) or other secret-related tools like 'secret_create' or 'secret_delete'. There's no context about prerequisites or exclusions.

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/bourbonkk/k8s-pilot'

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