Skip to main content
Glama

secret_list

Retrieve and list all Kubernetes Secrets in a specified namespace using the k8s-pilot server. Simplify cluster resource management with centralized access to Secret details.

Instructions

List all Secrets in a given namespace.

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

Returns: List of Secret basic information

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
context_nameYes
namespaceYes

Implementation Reference

  • The main handler function for the 'secret_list' tool. It is decorated with @mcp.tool() for registration and @use_current_context. Lists Kubernetes secrets in the specified namespace and context, returning their names and types.
    @mcp.tool() @use_current_context def secret_list(context_name: str, namespace: str): """ List all Secrets in a given namespace. Args: context_name: The Kubernetes context name namespace: The Kubernetes namespace Returns: List of Secret basic information """ core_v1: CoreV1Api = get_api_clients(context_name)["core"] secrets = core_v1.list_namespaced_secret(namespace) result = [{"name": secret.metadata.name, "type": secret.type} for secret in secrets.items] return result

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