list-pvc
List persistent volume claims in a Kubernetes namespace to monitor storage resources and manage cluster capacity.
Instructions
List Kubernetes persistent volume claims in a namespace
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "list-pvc"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| namespace | No | The namespace to list PVCs from (optional, defaults to current context namespace) |
Implementation Reference
- server.js:1507-1515 (handler)Handler for the 'list-pvc' tool. Executes 'kubectl get pvc -n [namespace] -o wide' to list PersistentVolumeClaims (PVCs) in the given namespace or default.
case "list-pvc": { const { namespace } = args || {}; const nsArg = namespace ? `-n ${namespace}` : ""; const cmd = `kubectl get pvc ${nsArg} -o wide`; const { stdout } = await execAsync(cmd); return { content: [{ type: "text", text: stdout || "No persistent volume claims found" }] }; } - server.js:149-161 (registration)Tool registration and schema definition for 'list-pvc' in the tools array, including input schema for optional namespace.
{ name: "list-pvc", description: "List Kubernetes persistent volume claims in a namespace", inputSchema: { type: "object", properties: { namespace: { type: "string", description: "The namespace to list PVCs from (optional, defaults to current context namespace)" } } } }, - server.js:152-159 (schema)Input schema for the 'list-pvc' tool, defining an optional 'namespace' parameter.
inputSchema: { type: "object", properties: { namespace: { type: "string", description: "The namespace to list PVCs from (optional, defaults to current context namespace)" } }