Skip to main content
Glama

get-events

Retrieve Kubernetes events to identify and resolve cluster issues, enabling efficient troubleshooting of pods, deployments, and services.

Instructions

Get Kubernetes events for troubleshooting

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
namespaceNoThe namespace to get events from (optional, defaults to current context namespace)

Implementation Reference

  • Executes the 'get-events' tool by running the kubectl get events command, optionally filtered by namespace, sorted by last timestamp, and returns the output as text content.
    case "get-events": { const { namespace } = args || {}; const nsArg = namespace ? `-n ${namespace}` : ""; const cmd = `kubectl get events ${nsArg} --sort-by='.lastTimestamp'`; const { stdout } = await execAsync(cmd); return { content: [{ type: "text", text: stdout || "No events found" }] }; }
  • Defines the tool metadata including name, description, and input schema allowing an optional namespace parameter.
    name: "get-events", description: "Get Kubernetes events for troubleshooting", inputSchema: { type: "object", properties: { namespace: { type: "string", description: "The namespace to get events from (optional, defaults to current context namespace)" } } } },

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/thekaranpargaie/kube-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server