Skip to main content
Glama

secret_get

Retrieve detailed information about a specific Kubernetes Secret within a given namespace and context using the k8s-pilot server. Simplify cluster resource management and access critical Secret data efficiently.

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
nameYes
namespaceYes

Implementation Reference

  • The handler function for the 'secret_get' MCP tool. It retrieves a specific Kubernetes Secret from the given namespace, 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 }
  • tools/secret.py:56-56 (registration)
    The @mcp.tool() decorator registers the secret_get function as an MCP tool.
    @mcp.tool()
  • The docstring provides the input schema (parameters) and output description for the secret_get tool.
    """ 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 """

Other Tools

Related 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