Skip to main content
Glama

pv_get

Retrieve detailed information about a specific PersistentVolume in Kubernetes. Specify the context name and PersistentVolume name to access its configuration and status efficiently.

Instructions

Get details of a specific PersistentVolume.

Args: context_name: The Kubernetes context name name: The PersistentVolume name

Returns: Detailed information about the PersistentVolume

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
context_nameYes
nameYes

Implementation Reference

  • The pv_get tool handler: retrieves PersistentVolume details using Kubernetes CoreV1Api. Registered via @mcp.tool() decorator. Input schema inferred from function signature (context_name: str, name: str).
    @mcp.tool() @use_current_context def pv_get(context_name: str, name: str): """ Get details of a specific PersistentVolume. Args: context_name: The Kubernetes context name name: The PersistentVolume name Returns: Detailed information about the PersistentVolume """ core_v1: CoreV1Api = get_api_clients(context_name)["core"] pv = core_v1.read_persistent_volume(name=name) return { "name": pv.metadata.name, "capacity": pv.spec.capacity, "access_modes": pv.spec.access_modes, "storage_class": pv.spec.storage_class_name, "host_path": pv.spec.host_path.path if pv.spec.host_path else None }

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