Skip to main content
Glama

delete_namespace

Delete a Kubernetes namespace and all contained resources, with dry-run preview and safeguards against deleting protected control-plane namespaces or its own service account namespace.

Instructions

[WRITE][risk=high] Delete a namespace and EVERYTHING in it. HIGH RISK — no undo.

Pass dry_run=True to preview without deleting.

Two namespaces are refused. The cluster's control-plane namespaces (kube-system, kube-public, kube-node-lease) need confirm=True — deleting one takes DNS and pod networking with it. The namespace holding this target's own ServiceAccount credential is refused outright and confirm does NOT override it: that delete revokes the credential it is running on. Both refusals are raised on the dry_run path too, so a preview never shows a green wouldDelete for a delete that would be rejected.

Args: name: Namespace name to delete. dry_run: If True, preview without deleting. confirm: Acknowledge deleting a protected control-plane namespace. target: k8s target name from config.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYes
targetNo
confirmNo
dry_runNo
Behavior5/5

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

No annotations provided, so the description carries the full burden. It fully discloses the destructive nature (HIGH RISK — no undo), special behaviors for protected namespaces (confirm required or outright refusal), and dry_run behavior (preview without deleting, also raises refusals). No annotation contradiction.

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

Conciseness5/5

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

Well-structured with a bold summary, usage tip, detailed behavior explanation, and parameter list. Every sentence is informative and to the point. No fluff.

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

Completeness5/5

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

Given the high-risk nature, 4 parameters, no output schema, and no annotations, the description is exhaustive. It covers purpose, safety, edge cases, parameter semantics, and context. Fully equips an AI agent to invoke the tool correctly.

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

Parameters5/5

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

Schema has 0% description coverage, meaning no parameter descriptions. The description compensates completely by listing all four parameters (name, dry_run, confirm, target) with clear, actionable explanations. Adds meaning beyond the schema's type information.

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

Purpose5/5

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

The description explicitly states the action ('Delete a namespace and EVERYTHING in it') and the resource (namespace). It distinguishes from sibling tools like create_namespace, delete_pod, etc., by emphasizing the scope and high risk. Clear and specific verb+resource usage.

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

Usage Guidelines5/5

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

Provides explicit when-to-use (deleting a namespace) and when-not-to-use (protected control-plane namespaces require confirm=True; self-service-account namespace is outright refused). Also recommends dry_run for preview. Gives clear guidance on alternatives within the same tool via the confirm flag.

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/AIops-tools/K8s-AIops'

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