list-pv
Retrieve persistent volume information from Kubernetes clusters to monitor storage resources and manage capacity.
Instructions
List Kubernetes persistent volumes
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-pv"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- server.js:1499-1505 (handler)The handler function for the 'list-pv' tool that runs the kubectl command to list all PersistentVolumes (PVs) in the cluster.
case "list-pv": { const cmd = `kubectl get pv -o wide`; const { stdout } = await execAsync(cmd); return { content: [{ type: "text", text: stdout || "No persistent volumes found" }] }; } - server.js:141-148 (schema)The tool definition including name, description, and empty input schema (no parameters required). This is part of the tools array used for tool listing and validation.
{ name: "list-pv", description: "List Kubernetes persistent volumes", inputSchema: { type: "object", properties: {} } }, - server.js:1392-1394 (registration)Registers the listTools handler which returns the full tools array containing the 'list-pv' tool definition.
server.setRequestHandler(ListToolsRequestSchema, async () => { return { tools }; });