Skip to main content
Glama

pvc_get

Retrieve detailed information about a specific PersistentVolumeClaim in a Kubernetes cluster. Specify the context name, namespace, and PVC name to access its configuration and status.

Instructions

Get details of a specific PersistentVolumeClaim.

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

Returns: Detailed information about the PersistentVolumeClaim

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
context_nameYes
nameYes
namespaceYes

Implementation Reference

  • The handler function for the 'pvc_get' MCP tool. It is decorated with @mcp.tool() for automatic registration and @use_current_context for context management. The function retrieves detailed information about a specific PersistentVolumeClaim (PVC) in the given namespace using the Kubernetes API.
    @mcp.tool() @use_current_context def pvc_get(context_name: str, namespace: str, name: str): """ Get details of a specific PersistentVolumeClaim. Args: context_name: The Kubernetes context name namespace: The Kubernetes namespace name: The PersistentVolumeClaim name Returns: Detailed information about the PersistentVolumeClaim """ core_v1: CoreV1Api = get_api_clients(context_name)["core"] pvc = core_v1.read_namespaced_persistent_volume_claim(name=name, namespace=namespace) return { "name": pvc.metadata.name, "status": pvc.status.phase, "storage": pvc.spec.resources.requests.get("storage"), "access_modes": pvc.spec.access_modes, "storage_class": pvc.spec.storage_class_name }

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