Skip to main content
Glama

statefulset_get

Retrieve detailed information about a specific StatefulSet in a Kubernetes cluster by providing context name, namespace, and StatefulSet name. Works with the k8s-pilot MCP server for cluster management.

Instructions

Get details of a specific StatefulSet.

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

Returns: Detailed information about the StatefulSet

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
context_nameYes
nameYes
namespaceYes

Implementation Reference

  • The core handler function for the 'statefulset_get' tool. Decorated with @mcp.tool() for registration and @use_current_context for context management. Retrieves StatefulSet details using Kubernetes AppsV1Api and returns name, replicas, labels, and container images.
    @mcp.tool() @use_current_context def statefulset_get(context_name: str, namespace: str, name: str): """ Get details of a specific StatefulSet. Args: context_name: The Kubernetes context name namespace: The Kubernetes namespace name: The StatefulSet name Returns: Detailed information about the StatefulSet """ apps_v1: AppsV1Api = get_api_clients(context_name)["apps"] statefulset = apps_v1.read_namespaced_stateful_set(name=name, namespace=namespace) return { "name": statefulset.metadata.name, "replicas": statefulset.status.replicas, "labels": statefulset.metadata.labels, "containers": [c.image for c in statefulset.spec.template.spec.containers] }

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