Skip to main content
Glama

serviceaccount_get

Retrieve detailed information about a specific Kubernetes ServiceAccount, including its configuration and permissions, by specifying context, namespace, and name.

Instructions

Get details of a specific ServiceAccount.

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

Returns: Detailed information about the ServiceAccount

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
context_nameYes
namespaceYes
nameYes

Implementation Reference

  • The handler function for the 'serviceaccount_get' tool. It retrieves detailed information about a specific Kubernetes ServiceAccount using the CoreV1Api client. The function is decorated with @mcp.tool() for registration and @use_current_context for context management.
    @mcp.tool() @use_current_context def serviceaccount_get(context_name: str, namespace: str, name: str): """ Get details of a specific ServiceAccount. Args: context_name: The Kubernetes context name namespace: The Kubernetes namespace name: The ServiceAccount name Returns: Detailed information about the ServiceAccount """ core_v1: CoreV1Api = get_api_clients(context_name)["core"] serviceaccount = core_v1.read_namespaced_service_account(name=name, namespace=namespace) return { "name": serviceaccount.metadata.name, "labels": serviceaccount.metadata.labels, "secrets": serviceaccount.secrets }

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