Skip to main content
Glama
BenedatLLC

Kubernetes Tools MCP Server

by BenedatLLC

get_pvc_summaries

List PersistentVolumeClaim summaries for a namespace or all namespaces and identify which pods mount each claim, helping detect orphaned or unmounted PVCs.

Instructions

Retrieves a list of PVCSummary objects for PersistentVolumeClaims in a given namespace or all namespaces, similar to kubectl get pvc.

For each PVC, this also resolves which pods currently mount it (by scanning pod
volumes in the same scope), which is useful for spotting orphaned PVCs — claims
with an empty `mounted_by` and no owning pod.

Parameters
----------
namespace : Optional[str], default=None
    The specific namespace to list PVCs from. If None, lists from all namespaces.

Returns
-------
list of PVCSummary
    A list of PVCSummary objects, each with the following fields:

    name : str
        Name of the PVC.
    namespace : str
        Namespace of the PVC.
    status : str
        Phase of the PVC ("Bound", "Pending", or "Lost").
    volume_name : Optional[str]
        Name of the bound PersistentVolume (None if unbound).
    capacity : Optional[str]
        Storage capacity (e.g. "10Gi"); falls back to the requested size when
        the claim is not yet bound.
    access_modes : list[str]
        Access modes (e.g. ["ReadWriteOnce"]).
    storage_class : Optional[str]
        StorageClass backing the claim.
    mounted_by : list[str]
        Names of pods (in the same scope) currently mounting this PVC. Empty
        for orphaned/unmounted claims.
    age : datetime.timedelta
        Age of the PVC (current time minus creation timestamp).

Raises
------
K8sConfigError
    If unable to initialize the K8S API.
K8sApiError
    If the API call to list PVCs fails.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
namespaceNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv2.1.0

TDQS

A4.5/5.0
Behavior4/5

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

No annotations are provided, so the description carries the full burden and does so well: it discloses that the tool scans pod volumes in the same scope to compute `mounted_by`, that this is scoped to the same namespace/all-namespaces selection, and it enumerates the error conditions (K8sConfigError, K8sApiError). Read-only nature is implied by 'retrieves' but not explicitly asserted.

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?

Well front-loaded: purpose and the mounted_by behavior come first, followed by parameters, returns, and raises. The Returns section is lengthy field-by-field documentation that partially duplicates the output schema, which is a minor redundancy rather than a structural flaw.

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

Completeness5/5

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

For a one-parameter read tool, the description covers purpose, the non-obvious mounted_by resolution behavior, the parameter's full semantics, and error modes. Nothing an agent needs to select or invoke it correctly is missing.

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

Parameters5/5

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

Schema description coverage is 0%, so the description must fully compensate for the single `namespace` parameter, and it does: it explains the type (Optional[str]), the default (None), and precisely what None means (list from all namespaces). No ambiguity remains for the caller.

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

Purpose5/5

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

States a specific verb (retrieves), resource (PVCSummary objects for PVCs), and scope (namespace or all namespaces), anchored to a familiar analogue ('similar to `kubectl get pvc`'). It further differentiates itself from siblings like get_pod_summaries by explaining it also resolves which pods mount each PVC.

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

Usage Guidelines4/5

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

Gives a clear use case — spotting orphaned PVCs via empty `mounted_by` — and frames the tool as the PVC equivalent of `kubectl get pvc`. It does not, however, name an alternative sibling or state when NOT to use it, so it stops short of full routing guidance.

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