Skip to main content
Glama

pv_list

List all PersistentVolumes in a Kubernetes cluster to monitor storage resources and manage volume allocations.

Instructions

List all PersistentVolumes in the cluster.

Args: context_name: The Kubernetes context name

Returns: List of PersistentVolume basic information

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
context_nameYes

Implementation Reference

  • The pv_list tool handler: lists all PersistentVolumes in the Kubernetes cluster using CoreV1Api, returning name, capacity, and access_modes for each.
    @mcp.tool()
    @use_current_context
    def pv_list(context_name: str):
        """
        List all PersistentVolumes in the cluster.
    
        Args:
            context_name: The Kubernetes context name
    
        Returns:
            List of PersistentVolume basic information
        """
        core_v1: CoreV1Api = get_api_clients(context_name)["core"]
        pvs = core_v1.list_persistent_volume()
        result = [{"name": pv.metadata.name, "capacity": pv.spec.capacity, "access_modes": pv.spec.access_modes} for pv in pvs.items]
        return result
  • tools/pv.py:8-8 (registration)
    The @mcp.tool() decorator registers the pv_list function as an MCP tool.
    @mcp.tool()
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries full burden for behavioral disclosure. It mentions the return type ('List of PersistentVolume basic information') but doesn't cover important aspects like whether this is a read-only operation, potential permissions needed, rate limits, or pagination behavior for large clusters.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is well-structured with clear sections (purpose, Args, Returns) and uses minimal words to convey the essential information. Every sentence serves a purpose, though the formatting with quotes and line breaks could be cleaner.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple list operation with 1 parameter and no output schema, the description covers the basics: what it does, the parameter, and return type. However, without annotations and with sibling tools that could cause confusion (like pv_get vs pv_list), more contextual guidance would be helpful for complete understanding.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, but the description includes an 'Args' section that documents the single parameter 'context_name'. This adds value beyond the bare schema, though it doesn't explain what a Kubernetes context name is or provide format examples. With 1 parameter documented, this meets the baseline for minimal viability.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('List all') and resource ('PersistentVolumes in the cluster'), providing specific verb+resource. However, it doesn't explicitly differentiate from sibling tools like 'pv_get' or 'pvc_list', which would be needed for a score of 5.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance is provided on when to use this tool versus alternatives like 'pv_get' (for specific PV details) or 'pvc_list' (for PersistentVolumeClaims). The description only states what it does, not when it's appropriate.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other 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