list-crds
List Kubernetes custom resource definitions to discover and manage extended API resources in your cluster.
Instructions
List Kubernetes custom resource definitions
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-crds"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- server.js:2023-2028 (handler)The handler function for the 'list-crds' tool. It executes the kubectl command 'kubectl get crds -o wide' using execAsync and returns the output as text content.
const cmd = `kubectl get crds -o wide`; const { stdout } = await execAsync(cmd); return { content: [{ type: "text", text: stdout || "No custom resource definitions found" }] }; } - server.js:957-963 (registration)Registration of the 'list-crds' tool in the tools array, which is returned by the ListToolsRequestHandler. Includes the tool name, description, and empty input schema.
name: "list-crds", description: "List Kubernetes custom resource definitions", inputSchema: { type: "object", properties: {} } }, - server.js:959-962 (schema)Input schema for the 'list-crds' tool, which expects no parameters (empty properties).
inputSchema: { type: "object", properties: {} }