Skip to main content
Glama

pvc_create

Create PersistentVolumeClaims in Kubernetes namespaces to allocate storage for applications using specified size, access modes, and storage class.

Instructions

Create a PersistentVolumeClaim in the specified namespace.

Args: context_name: The Kubernetes context name namespace: The Kubernetes namespace name: The PersistentVolumeClaim name storage: The storage size (e.g., "10Gi") access_modes: List of access modes (e.g., ["ReadWriteOnce"]) storage_class: The storage class name (optional)

Returns: Status of the creation operation

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
context_nameYes
namespaceYes
nameYes
storageYes
access_modesYes
storage_classNo

Implementation Reference

  • The pvc_create function implements the core logic of the tool: it constructs a V1PersistentVolumeClaim object using the provided parameters and uses the Kubernetes CoreV1Api to create it in the specified namespace.
    def pvc_create(context_name: str, namespace: str, name: str, storage: str, access_modes: list, storage_class: str = None):
        """
        Create a PersistentVolumeClaim in the specified namespace.
    
        Args:
            context_name: The Kubernetes context name
            namespace: The Kubernetes namespace
            name: The PersistentVolumeClaim name
            storage: The storage size (e.g., "10Gi")
            access_modes: List of access modes (e.g., ["ReadWriteOnce"])
            storage_class: The storage class name (optional)
    
        Returns:
            Status of the creation operation
        """
        core_v1: CoreV1Api = get_api_clients(context_name)["core"]
        pvc = V1PersistentVolumeClaim(
            metadata=V1ObjectMeta(name=name),
            spec=V1PersistentVolumeClaimSpec(
                access_modes=access_modes,
                resources=V1ResourceRequirements(requests={"storage": storage}),
                storage_class_name=storage_class
            )
        )
        created_pvc = core_v1.create_namespaced_persistent_volume_claim(namespace=namespace, body=pvc)
        return {"name": created_pvc.metadata.name, "status": "Created"}
  • tools/pvc.py:27-27 (registration)
    The @mcp.tool() decorator registers the pvc_create function as an MCP tool.
    @mcp.tool()
  • The @check_readonly_permission decorator ensures appropriate permissions for the tool.
    @check_readonly_permission
  • The @use_current_context decorator provides the current context for the tool.
    @use_current_context
Behavior2/5

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

No annotations are provided, so the description carries full burden. It states this is a creation operation (implying mutation) but doesn't disclose behavioral traits like required permissions, whether this is idempotent, what happens on failure, rate limits, or what 'Status of the creation operation' actually means. For a Kubernetes resource creation tool with zero annotation coverage, this leaves significant gaps.

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

Conciseness5/5

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

The description is efficiently structured with a clear purpose statement followed by organized Args and Returns sections. Every sentence earns its place - the first sentence states what the tool does, and the parameter documentation is essential given the 0% schema coverage. No wasted words or redundancy.

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?

Given the complexity (Kubernetes resource creation with 6 parameters), no annotations, and no output schema, the description is moderately complete. It documents parameters well but lacks behavioral context, error handling information, and clear output expectations. The 'Returns' statement is vague - 'Status of the creation operation' without specifying format or possible values.

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

Parameters4/5

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

With 0% schema description coverage, the description compensates well by documenting all 6 parameters with clear explanations and examples. It specifies which are required vs optional, provides format examples ('10Gi', ['ReadWriteOnce']), and clarifies the purpose of each parameter. This adds substantial value beyond the bare schema.

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 verb 'Create' and resource 'PersistentVolumeClaim' with location context 'in the specified namespace'. It distinguishes from siblings like pvc_delete, pvc_get, pvc_list, and pvc_update by specifying creation rather than other operations. However, it doesn't explicitly contrast with pv_create (PersistentVolume vs PersistentVolumeClaim) which could cause confusion.

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?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention prerequisites (e.g., existing storage classes), when to use pvc_create vs pv_create, or what happens if the PVC already exists. With many sibling tools for different Kubernetes resources, this lack of differentiation is problematic.

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