Skip to main content
Glama
abhijeetka
by abhijeetka

get_events

Retrieve Kubernetes events from a specific namespace to monitor cluster activity and troubleshoot issues.

Instructions

Get the events of a specific namespace

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
namespaceNodefault

Implementation Reference

  • The main handler function for the 'get_events' tool. It is decorated with @mcp.tool() which registers it with the FastMCP server. The function executes 'kubectl get events' in the specified namespace, parses the JSON output, and returns it or an error dictionary.
    @mcp.tool()
    async def get_events(namespace: str = "default") -> dict:
        """Get the events of a specific namespace"""
        try:
            cmd = ["kubectl", "get", "events", "-n", namespace, "-o", "json"]
            result = subprocess.run(cmd, capture_output=True, text=True, check=True)
            return json.loads(result.stdout)
        except subprocess.CalledProcessError as e:
            return {"error": f"Failed to get events: {str(e)}"}
Behavior1/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden of behavioral disclosure. It only states what the tool does ('get events') without any information on permissions required, rate limits, whether it's read-only or has side effects, or what the output format might be. This leaves critical behavioral traits unspecified.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, straightforward sentence that efficiently conveys the core purpose without unnecessary words. It's front-loaded with the main action, making it easy to parse, though it could be slightly more informative without sacrificing brevity.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the complexity of retrieving events (likely in a Kubernetes or similar context), no annotations, no output schema, and low schema coverage, the description is incomplete. It doesn't address key aspects like what events are returned, error handling, or how this tool fits into the broader ecosystem of sibling tools, leaving significant gaps for an AI agent.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The description mentions 'specific namespace' which aligns with the 'namespace' parameter, but with 0% schema description coverage, it doesn't add meaningful semantics. It fails to explain what a namespace is in this context, valid values, or the implications of the default value 'default'. The description doesn't compensate for the lack of schema documentation.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose3/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description 'Get the events of a specific namespace' clearly states the action (get) and resource (events), but it's vague about what 'events' are in this context (e.g., Kubernetes events, calendar events, system logs). It doesn't differentiate from siblings like 'get_pods' or 'get_logs', which also retrieve data from namespaces.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance is provided on when to use this tool versus alternatives. For example, it doesn't specify if this is for monitoring, debugging, or if other tools like 'get_failing_pods' might be more appropriate in certain scenarios. The description implies usage but offers no explicit context or exclusions.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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/abhijeetka/mcp-k8s-server'

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