api-versions
Retrieve available API versions for Kubernetes clusters to ensure compatibility when managing resources through the MCP server.
Instructions
Get available API versions
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- server.js:1787-1793 (handler)The handler function for the "api-versions" tool that runs the 'kubectl api-versions' command and returns the output.case "api-versions": { const cmd = `kubectl api-versions`; const { stdout } = await execAsync(cmd); return { content: [{ type: "text", text: stdout || "No API versions found" }] }; }
- server.js:627-634 (schema)Defines the input schema for the "api-versions" tool, which requires no parameters.{ name: "api-versions", description: "Get available API versions", inputSchema: { type: "object", properties: {} } },
- server.js:1392-1394 (registration)Registers the request handler for listing tools, returning the tools array that includes "api-versions".server.setRequestHandler(ListToolsRequestSchema, async () => { return { tools }; });