list-limitranges
List Kubernetes limit ranges in a namespace to manage resource constraints and quotas for pods and containers.
Instructions
List Kubernetes limit ranges in a namespace
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| namespace | No | The namespace to list limit ranges from (optional, defaults to current context namespace) |
Implementation Reference
- server.js:2001-2009 (handler)The handler function that implements the 'list-limitranges' tool. It constructs a kubectl command to list LimitRanges in the specified or default namespace and returns the formatted output.case "list-limitranges": { const { namespace } = args || {}; const nsArg = namespace ? `-n ${namespace}` : ""; const cmd = `kubectl get limitranges ${nsArg} -o wide`; const { stdout } = await execAsync(cmd); return { content: [{ type: "text", text: stdout || "No limit ranges found" }] }; }
- server.js:928-940 (schema)The schema definition and registration entry for the 'list-limitranges' tool in the tools array, which is returned by the ListTools handler. Defines the input schema with an optional namespace parameter.{ name: "list-limitranges", description: "List Kubernetes limit ranges in a namespace", inputSchema: { type: "object", properties: { namespace: { type: "string", description: "The namespace to list limit ranges from (optional, defaults to current context namespace)" } } } },